Skip to content

Commit

Permalink
Merge pull request #71 from politie/update-workflows
Browse files Browse the repository at this point in the history
Update build and release workflows
  • Loading branch information
guidoderooij authored Mar 21, 2024
2 parents 3dc66ed + 04a6393 commit 3a85be9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,23 @@ 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') }}
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: Test
Expand Down
12 changes: 6 additions & 6 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.lib-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: lib-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: Use node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand All @@ -58,7 +58,7 @@ jobs:
run: npx @vscode/vsce publish -p ${{ secrets.MARKETPLACE_TOKEN }} --no-git-tag-version

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

0 comments on commit 3a85be9

Please sign in to comment.