-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (42 loc) · 1.08 KB
/
publish-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
# .github/workflows/publish-release.yml
name: Publish release
on:
push:
tags:
- 'v*'
jobs:
check-permission:
name: check permission
runs-on: ubuntu-latest
outputs:
permission: ${{ steps.check.outputs.permission }}
steps:
- id: check
uses: shogo82148/actions-check-permissions@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
name: Publish release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
needs:
- check-permission
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout code
uses: actions/checkout@v4
##########################
# Release from tags #
##########################
- name: Publish Release
id: publish_release
uses: ghalactic/github-release-from-tag@v5
if: github.ref_type == 'tag'
with:
prerelease: "false"
reactions: rocket
token: ${{ secrets.GITHUB_TOKEN }}