Skip to content

Remove prefix

Remove prefix #5

Workflow file for this run

name: Build Apps, Deploy Web and Create Release
on:
push:
branches:
- inherit # todo remove, can't workflow_dispatch from branch
env:
TAG_PREFIX: test-
RELEASE_BRANCH_PREFIX: test-release
jobs:
validate_version:
name: Update version and push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Get current version from package.json
id: get_current_version
run: |
CURRENT_APP_VERSION=$(node -p "require('./package.json').version")
echo "version=$CURRENT_APP_VERSION" >> $GITHUB_OUTPUT
- name: Verify provided version not already released
run: |
git fetch --tags
TAG_NAME="$TAG_PREFIX${{ steps.get_current_version.outputs.version }}"
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
echo "Error: Tag $TAG_NAME already exists"
exit 1
fi
push_release:
needs: validate_version
environment: deploy
name: Add version to apps, push release branch and tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run trapeze (update iOS and Android version/code)
run: pnpm exec trapeze run trapeze.yaml
env:
APP_BUILD: ${{ github.run_number }}
APP_VERSION: ${{ needs.validate_version.outputs.version }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Commit and push release
run: |
git checkout -b $RELEASE_BRANCH_PREFIX/${{ needs.validate_version.outputs.version }}
git config --global user.email "[email protected]"
git config --global user.name "Voyager CI"
git add .
git commit -m "Release ${{ needs.validate_version.outputs.version }} (${{ github.run_number }})"
git tag $TAG_PREFIX${{ needs.validate_version.outputs.version }}
git push origin HEAD
git push --tags