Skip to content

Commit

Permalink
chore: added release automation with release please and github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp-winterle committed Jun 17, 2024
1 parent 0e4e0ed commit 0c3b896
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
node-version: 20
- run: yarn
- run: yarn test

Expand All @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn publish
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Versioning and Tagging

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
# this is a built-in strategy in release-please, see "Action Inputs"
# for more options
release-type: simple
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@
"scripts": {
"test": "cross-env NODE_ENV=development node --experimental-vm-modules node_modules/jest/bin/jest.js --bail --verbose",
"build": "echo 'build is not configured for package. Skipping.'",
"prepare": "husky",
"release": "release-please"
"prepare": "husky"
},
"files": [
"docs",
Expand Down

0 comments on commit 0c3b896

Please sign in to comment.