Skip to content

Commit

Permalink
enhance(publish-release): inline workflow action + allow manual execu…
Browse files Browse the repository at this point in the history
…tion (#724)
  • Loading branch information
caugner committed Apr 8, 2024
1 parent 603c07a commit 063fc20
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 6 deletions.
44 changes: 38 additions & 6 deletions .github/workflows/publish-release.yml
Expand Up @@ -5,11 +5,43 @@ on:
branches:
- main

workflow_dispatch:
inputs:
force-npm-publish:
description: "Force npm publish"
type: boolean

permissions:
contents: write
pull-requests: write

jobs:
publish-release:
uses: mdn/workflows/.github/workflows/publish-release.yml@main
with:
target-repo: "mdn/data"
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: github.repository == 'mdn/data'
runs-on: ubuntu-latest

steps:
- name: Release
uses: GoogleCloudPlatform/release-please-action@v4
id: release

- name: Setup
if: ${{ github.event.inputs.force-npm-publish || steps.release.outputs.release_created }}
uses: actions/checkout@v4

- name: Checkout
if: ${{ github.event.inputs.force-npm-publish || steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org/"
node-version-file: ".nvmrc"

- name: Install
if: ${{ github.event.inputs.force-npm-publish || steps.release.outputs.release_created }}
run: npm ci

- name: Publish
if: ${{ github.event.inputs.force-npm-publish || steps.release.outputs.release_created }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .nvmrc
@@ -0,0 +1 @@
v18
3 changes: 3 additions & 0 deletions .release-please-manifest.json
@@ -0,0 +1,3 @@
{
".": "2.4.2"
}
15 changes: 15 additions & 0 deletions release-please-config.json
@@ -0,0 +1,15 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"last-release-sha": "0a7a19329406b0e8f555083f7dcdd6e84a3d4707",
"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 063fc20

Please sign in to comment.