Skip to content

Commit

Permalink
github releases automated
Browse files Browse the repository at this point in the history
  • Loading branch information
johan-gorter committed Jan 31, 2024
1 parent cfdb3e7 commit 414a67b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,39 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run ci
- uses: JS-DevTools/npm-publish@v3
- name: Publish to NPM if version in package.json has changed
id: publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
provenance: true
- name: Create tag
if: steps.publish.outputs.type
uses: actions/github-script@v6
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/v${{ steps.publish.outputs.version }}',
sha: context.sha
})
- name: Create a Github Release when a version was published
if: steps.publish.outputs.type
uses: ncipollo/release-action@v1
with:
tag: v${{ steps.publish.outputs.version }}
name: v${{ steps.publish.outputs.version }}
makeLatest: true

permissions:
id-token: write
contents: write
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"prepare": "husky install",
"prepublishOnly": "tsa clean && npm run dist",
"assist": "tsa assist",
"release": "tsa release",
"release": "echo 'You can make a release by updating the version number in package.json and push the changes'",
"fix": "tsa fix",
"fixall": "tsa fixall",
"clean": "tsa clean",
Expand Down Expand Up @@ -89,7 +89,7 @@
"rollup": "4.9.6",
"sinon": "17.0.1",
"sinon-chai": "3.7.0",
"typescript-assistant": "0.65.7"
"typescript-assistant": "0.66.9"
},
"importSort": {
".js, .jsx, .ts, .tsx": {
Expand Down

0 comments on commit 414a67b

Please sign in to comment.