generated from haru52/base_template
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (49 loc) · 1.86 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
# 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@v3
with:
fetch-depth: 0
# https://semantic-release.gitbook.io/semantic-release/recipes/ci-configurations/github-actions#pushing-package.json-changes-to-a-master-branch
# If the branch protection for this repo's release branch (e.g., main)
# is enabled, uncomment the next line.
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- uses: actions/setup-python@v4
with:
cache: pipenv
- name: Install dependencies
run: |
npm ci
python -m pip install --upgrade pip
python -m pip install pipenv
python -m pipenv sync
- 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
# If the branch protection for this repo's release branch (e.g., main)
# is enabled, delete or comment out the preceding
# `GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}`
# and uncomment the next line.
GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
# If this is an npm package project, uncomment the next line.
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: npx semantic-release