Skip to content

Commit

Permalink
feat(workflows): inline publish-release workflow + add config (#1740)
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner authored Mar 18, 2024
1 parent 1d123cd commit 065e9b1
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 7 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,27 @@ on:

jobs:
publish-release:
uses: mdn/workflows/.github/workflows/publish-release.yml@main
with:
target-repo: "mdn/bob"
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
if: github.repository == 'mdn/bob'
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v4
id: release
with:
token: "${{ secrets.GITHUB_TOKEN }}"
release-type: "node"

- uses: actions/checkout@v4
if: steps.release.outputs.release_created

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
if: steps.release.outputs.release_created

- run: npm ci
if: steps.release.outputs.release_created

- run: npm publish
env:
NODE_AUTH_TOKEN: "${{secrets.NPM_AUTH_TOKEN}}"
if: steps.release.outputs.release_created
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ build
coverage
docs
node_modules
# This can be removed after https://github.com/googleapis/release-please/issues/1802 is fixed
# These may be removed after https://github.com/googleapis/release-please/issues/1802 is fixed
.release-please-manifest.json
CHANGELOG.md
# TSC output:
lib/*.js
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "4.0.0"
}
15 changes: 15 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"last-release-sha": "cd5ab850a61b040a7e178e22ddd8d905cfd647e9",
"release-type": "node",
"changelog-sections": [
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "enhance", "section": "Enhancements", "hidden": false },
{ "type": "chore", "section": "Miscellaneous", "hidden": false }
],
"include-component-in-tag": false,
"packages": {
".": {}
}
}

0 comments on commit 065e9b1

Please sign in to comment.