Skip to content

Commit

Permalink
fix: make own job for bumping version
Browse files Browse the repository at this point in the history
  • Loading branch information
javierguzman committed Sep 27, 2023
1 parent 1bf2911 commit 2ee598a
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,42 @@ jobs:
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-timeout 300000 # sometimes yarn takes time, therefore, we increase the timeout
- run: yarn run test
bump-version:
needs: [testing]
runs-on: ubuntu-20.04
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests

strategy:
fail-fast: false

steps:
- name: Setup Nodejs
uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: node_modules
key: release-${{ hashFiles('package.json', 'yarn.lock') }}
- name: Install node_modules # we do this so we can use semantic-release
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-timeout 300000 # sometimes yarn takes time, therefore, we increase the timeout
- name: Run semantic-release to bump version
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: npx semantic-release

build:
runs-on: ${{ matrix.os }}
needs: [testing]
needs: [bump-version]
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
Expand All @@ -63,8 +95,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 18
Expand Down Expand Up @@ -104,10 +134,6 @@ jobs:
- name: Install node_modules
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-timeout 300000 # sometimes yarn takes time, therefore, we increase the timeout
- name: Run semantic-release to bump version
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: npx semantic-release
- if: runner.os == 'macOS'
name: Setup Apple certificates
env:
Expand Down

0 comments on commit 2ee598a

Please sign in to comment.