Skip to content

Commit

Permalink
Update workflows (#123)
Browse files Browse the repository at this point in the history
* Update build.yml

Use latest versions of the actions

* Fix typo in build.yml

* Update release.yml

* Use right token
  • Loading branch information
guidoderooij authored Mar 21, 2024
1 parent ef5341b commit 6c4b7bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: ${{ matrix.node-version }}-${{ runner.OS }}-build-${{ hashFiles('package.json') }}

- name: Install
if: steps.cache-modules.output.cache-hit != 'true'
if: ${{ steps.cache-modules.outputs.cache-hit != 'true' }}
run: npm install

- name: Lint, test & build
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]

env:
NODE_VERSION: 16.x
NODE_VERSION: 18.x

jobs:
bump-version:
Expand All @@ -16,14 +16,14 @@ jobs:
tag-name: ${{ steps.bump.outputs.newTag }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# This is a public_repo Github personal access token.
token: ${{ secrets.WORKFLOW_GITHUB_TOKEN }}

- name: Bump version
id: bump
uses: phips28/gh-action-bump-version@v9.1.0
uses: phips28/gh-action-bump-version@v11.0.4
with:
tag-prefix: 'v'
commit-message: '[CI/CD]: bump to {{version}}'
Expand All @@ -35,12 +35,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ needs.bump-version.outputs.tag-name }}

- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.bump-version.outputs.tag-name }}

Expand All @@ -51,12 +51,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ needs.bump-version.outputs.tag-name }}

- name: Use node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand Down

0 comments on commit 6c4b7bd

Please sign in to comment.