Skip to content

Commit

Permalink
ci: use environment (#32)
Browse files Browse the repository at this point in the history
* ci: use environment

* chore: pre

* chore: pre
  • Loading branch information
hi-ogawa committed Apr 21, 2023
1 parent d2c04a5 commit 080f72a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
jobs:
release:
runs-on: ubuntu-22.04
environment:
name: npm-release
url: ${{ steps.release_log.outputs.RELEASE_URL }}
permissions:
contents: read
id-token: write
Expand All @@ -32,3 +35,9 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: "true"
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
- id: release_log
run: |
package_name="@hiogawa/${{ inputs.package }}"
package_version=$(jq -r .version packages/${{ inputs.package }}/package.json)
echo "RELEASE_URL=https://www.npmjs.com/package/${package_name}/v/${package_version}" >> "$GITHUB_OUTPUT"
2 changes: 1 addition & 1 deletion packages/utils-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hiogawa/utils-react",
"version": "1.2.1-pre.2",
"version": "1.2.1-pre.3",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hiogawa/utils",
"version": "1.4.2-pre.7",
"version": "1.4.2-pre.8",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down

0 comments on commit 080f72a

Please sign in to comment.