Release #186
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# https://semantic-release.gitbook.io/semantic-release/recipes/ci-configurations/github-actions | |
name: Release | |
"on": | |
workflow_run: | |
workflows: Test | |
types: completed | |
branches: main | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: github.event.workflow_run.conclusion == 'success' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# https://semantic-release.gitbook.io/semantic-release/recipes/ci-configurations/github-actions#pushing-package.json-changes-to-a-master-branch | |
# 当リポジトリのリリースブランチ(例:main)に対するブランチ保護が有効 | |
# な場合、次の行をアンコメントしてください。 | |
# persist-credentials: false | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .tool-versions | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# https://semantic-release.gitbook.io/semantic-release/recipes/ci-configurations/github-actions#pushing-package.json-changes-to-a-master-branch | |
# 当リポジトリのリリースブランチ(例:main)に対するブランチ保護が有効 | |
# な場合、上方の `GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}` を削除 | |
# またはコメントアウトし、次の行をアンコメントしてください。 | |
# GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | |
# 当リポジトリが npm パッケージプロジェクトである場合、 | |
# 次の行をアンコメントしてください。 | |
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release |