ci: dev releases workflow #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compares the version in package.json to tags on the repo. If the tag doesn't exist, a new tag is created, which | |
# then triggers the normal "on tag" release automation in the build job | |
name: Auto Tag | |
on: | |
push: | |
branches: | |
- develop | |
- dev-releases | |
concurrency: | |
group: dev-release-check | |
jobs: | |
release-dev: | |
name: Release dev version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clean workspace | |
uses: Chia-Network/actions/clean-workspace@main | |
- name: Checkout current branch | |
uses: actions/checkout@v4 | |
with: | |
# Need PACKAGE_ADMIN_PAT token so when the tag is created, the tag automation runs | |
token: ${{ secrets.PACKAGE_ADMIN_PAT }} | |
fetch-depth: 0 | |
- name: Setup commit signing for ChiaAutomation | |
uses: Chia-Network/actions/commit-sign/gpg@main | |
with: | |
gpg_private_key: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_KEY }} | |
passphrase: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_PASSPHRASE }} | |
- name: Check for current version tag. Create if it doesn't exist | |
run: | | |
version='dev' | |
echo "Version is: $version" | |
echo "Creating and pushing dev tag" | |
git tag $version -m "Release $version" | |
git push origin $version |