Workflow file for this run
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
on: | |
release: | |
# Only use the types keyword to narrow down the activity types that will trigger your workflow. | |
types: [published] | |
name: Update release version in package.json | |
jobs: | |
up_version: | |
runs-on: ubuntu-latest | |
environment: netlify | |
strategy: | |
matrix: | |
node: [16] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- uses: actions/checkout@master | |
with: | |
ref: 'refs/heads/main' | |
token: ${{ secrets.ACTION_GITHUB_BOT }} | |
# Note: it's important that this is being run before the version is upped | |
# because a commit will be created during the process | |
- name: Set git config | |
run: | | |
# setup the username and email. | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: Up version | |
run: yarn version --new-version ${{ github.event.release.tag_name }} | |
- name: Push version commit | |
run: git push origin main |