Skip to content

Commit

Permalink
Fix/release please action (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaLanziani authored Sep 21, 2023
1 parent 977aaea commit 677af2b
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: go
command: manifest
token: ${{ steps.get_installation_token.outputs.token }}
bump-minor-pre-major: true
package-name: release-please-action
extra-files: |
npm/package.json

# The logic below handles the npm publication
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}

# The logic below handles the npm publication:
- uses: actions/checkout@v2
Expand All @@ -40,7 +40,7 @@ jobs:
id: commit_author
run: |
author=$(gh pr list --search ${{ github.sha }} --state merged --json mergedBy --jq '.[0].mergedBy.login')
echo "author=${author}" >> $$GITHUB_OUTPUT
echo "author=${author}" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }}
if: ${{ steps.release.outputs.release_created }}
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 @@
{
".": "0.4.0"
}
4 changes: 2 additions & 2 deletions npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "initium",
"binaryName": "initium",
"repositoryName": "initium-cli",
"version": "0.3.0",
"version": "0.4.0",
"description": "A single static binary that can run on any CI to build your code and deploy it in a single step.",
"scripts": {
"postinstall": "node scripts/npm-install.js",
Expand Down
1 change: 0 additions & 1 deletion npm/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ OTP=$(curl -s \
-f https://optic-zf3votdk5a-ew.a.run.app/api/generate/$OPTIC_TOKEN)

echo "Publish package ${PACKAGE_NAME}:${PACKAGE_VERSION}"

npm publish --otp ${OTP} --access public --provenance
28 changes: 28 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"release-type": "simple",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease": false,
"extra-files": [
{
"type": "json",
"path": "npm/package.json",
"jsonpath": "$.version"
}, {
"type": "json",
"path": "npm/package-lock.json",
"jsonpath": "$.version"
}, {
"type": "json",
"path": "npm/package-lock.json",
"jsonpath": "$.packages[''].version"
}
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

0 comments on commit 677af2b

Please sign in to comment.