Repository navigation
65 lines (63 loc) · 1.84 KB
/
Copy pathrelease-workflow.yml
File metadata and controls
65 lines (63 loc) · 1.84 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: release
on:
workflow_call:
inputs:
asdf:
default: false
description: Install asdf and plugins if true
required: false
type: boolean
node-version:
default: '18.16.0'
description: Node runtime version
required: false
type: string
python-version:
default: '3.10'
description: Python runtime version
required: false
type: string
secrets:
token:
description: Machine user GitHub token
required: true
ssh-key:
description: Machine user GitHub SSH key
required: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up Node ${{ inputs.node-version }}
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ inputs.node-version }}
- uses: actions/setup-python@v4.6.0
with:
python-version: ${{ inputs.python-version }}
- uses: actions/checkout@v3.5.2
with:
fetch-depth: 0
token: ${{ secrets.token }}
- name: Install asdf
uses: asdf-vm/actions/setup@v2.1.0
if: inputs.asdf
- name: Install asdf plugins
if: inputs.asdf
run: make asdf
- name: Install machine user SSH key
env:
SSH_KEY: ${{ secrets.ssh-key }}
if: env.SSH_KEY != null
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: |
${{ secrets.ssh-key }}
- name: Run semantic-release
env:
GH_TOKEN: ${{ secrets.token }}
run: |
pip install poetry python-semantic-release==7.33.3
git config --global user.name "github-actions"
git config --global user.email "action@github.com"
semantic-release publish -v DEBUG -D commit_author="github-actions <action@github.com>"