Skip to content

Commit

Permalink
chore: Adding release plz (#98)
Browse files Browse the repository at this point in the history
Adding release plz

Signed-off-by: Todd Baert <[email protected]>
  • Loading branch information
toddbaert authored Jul 22, 2022
1 parent 26c0b07 commit cfa138b
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 30 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
push:
branches:
- main
name: Run Release Please
jobs:
release-please:
runs-on: ubuntu-latest

# Release-please creates a PR that tracks all changes
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main

# The logic below handles the npm publication:
- name: Checkout Repository
if: ${{ steps.release.outputs.releases_created }}
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
if: ${{ steps.release.outputs.releases_created }}
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Build Packages
if: ${{ steps.release.outputs.releases_created }}
run: |
npm ci
npm run build
# Release Please has already incremented versions and published tags, so we just
# need to publish all unpublished versions to NPM here
# Our scripts only publish versions that do not already exist.
- name: Publish to NPM
if: ${{ steps.release.outputs.releases_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm run publish
30 changes: 0 additions & 30 deletions .github/workflows/release.yml

This file was deleted.

1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
13 changes: 13 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"bootstrap-sha": "9ec6555fb0a9144a70020e52d8c718c8424db225",
"packages": {
".": {
"releaseType": "node",
"prerelease": false,
"bumpMinorPreMajor": false,
"bumpPatchForMinorPreMajor": false,
"changelogPath": "CHANGELOG.md",
"versioning": "default"
}
}
}

0 comments on commit cfa138b

Please sign in to comment.