-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsemantic-release.github-only.yml
More file actions
47 lines (39 loc) · 1.16 KB
/
semantic-release.github-only.yml
File metadata and controls
47 lines (39 loc) · 1.16 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
name: Semantic Release with Python
on:
workflow_call:
secrets:
PAT:
required: true
outputs:
version:
description: 'The next release version'
value: ${{ jobs.release.outputs.version }}
jobs:
release:
name: Release using python-semantic-release config.
runs-on: ubuntu-latest
outputs:
version: ${{ steps.latest-release.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Release
id: release
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
npx semantic-release
- name: Get release version
id: latest-release
run: |
RELEASE_VERSION=$(gh release list --repo ${{ github.repository }} | head -n 1 | cut -f 1)
echo "version=$RELEASE_VERSION" >> "$GITHUB_ENV"
env:
GH_TOKEN: ${{ secrets.PAT }}