-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (35 loc) · 1.28 KB
/
release.yml
File metadata and controls
39 lines (35 loc) · 1.28 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
name: Release
on:
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
environment: ReleaseAction
steps:
- name: Checkout sources in container
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v3.5.2
with:
fetch-depth: 0 # get the tags to figure out new version tag
- name: Automatic version
id: versioning
uses: PaulHatch/semantic-version@a8f8f59fd7f0625188492e945240f12d7ad2dca3 #v5.4.0
with:
tag_prefix: "v"
- if: ${{ steps.versioning.outputs.changed == 'true'}}
name: Create tag
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ steps.versioning.outputs.version_tag }}',
sha: context.sha
})
- if: ${{ steps.versioning.outputs.changed == 'true'}}
name: Release artifacts
uses: ncipollo/release-action@bcfe5470707e8832e12347755757cec0eb3c22af #v1.18.0
with:
artifacts: "dist/*.tar.gz,dist/*.zip"
tag: ${{ steps.versioning.outputs.version_tag }}
token: ${{ secrets.GITHUB_TOKEN }}