Skip to content

Commit

Permalink
ci(dev): attempt recreate tag ci
Browse files Browse the repository at this point in the history
  • Loading branch information
SARDONYX-sard committed Oct 9, 2023
1 parent 3bf61b9 commit f328b00
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions .github/workflows/dev-release-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,39 +40,22 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const refName = 'refs/tags/development';
try {
// Check if the tag exists
const existingRef = await github.rest.git.getRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: refName
});
// If the tag exists, delete it
await github.rest.git.deleteRef({
const refObj = {
owner: context.repo.owner,
repo: context.repo.repo,
ref: refName
});
ref: refName,
sha: context.sha,
message: 'Tagging commit for development'
};
console.log(`Deleted existing tag ${refName}`);
try {
await github.rest.git.updateRef(refObj);
} catch (error) {
// Ignore errors if the tag does not exist
console.log(`Tag ${refName} does not exist. Proceeding to create it.`);
console.log(`${error}`);
await github.rest.git.createRef(refObj);
console.log(`Created tag ${refName}`);
}
// Create the new tag
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: refName,
sha: context.sha,
message: 'Tagging commit for development'
});
console.log(`Created tag ${refName}`);
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down

0 comments on commit f328b00

Please sign in to comment.