Skip to content

Commit

Permalink
ci: switch to release-please for release automation
Browse files Browse the repository at this point in the history
Release-As: 0.0.2
  • Loading branch information
blacha committed Aug 11, 2022
1 parent 926599c commit c5ad62d
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 1,740 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,3 @@ jobs:
steps:
- uses: linz/action-typescript@v1

- name: Create github release
if: startsWith(github.ref, 'refs/tags/v')
run: npx conventional-github-releaser -p angular
env:
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Publish to NPM
if: startsWith(github.ref, 'refs/tags/v')
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN_LINZJS}}
30 changes: 30 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
branches:
- master

name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: "@linz/template-javascript-hello-world"
token: ${{ secrets.GITHUB_TOKEN }}

publish-release:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: linz/action-typescript@v1

- name: Publish to Github
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.2.0"
}
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@
"organization": true
},
"devDependencies": {
"@linzjs/style": "^3.9.0",
"conventional-changelog-cli": "^2.2.2",
"conventional-github-releaser": "^3.1.5"
"@linzjs/style": "^3.9.0"
},
"scripts": {
"build": "tsc",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",
"lint": "npx eslint . --ignore-path .gitignore",
"test": "echo No tests yet"
"test": "echo 'No tests yet'"
},
"publishConfig": {
"access": "public"
Expand Down
11 changes: 11 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
"prerelease": false
}
}
}
Loading

0 comments on commit c5ad62d

Please sign in to comment.