-
-
Notifications
You must be signed in to change notification settings - Fork 9
55 lines (49 loc) · 1.58 KB
/
release.yaml
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
---
name: release
run-name: Release ${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: |
Version to release. Must be greater than the last version.
required: true
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: nhatthm/gh-actions/checkout@master
with:
token: ${{ secrets.RELEASE_TOKEN }}
ref: master
fetch-depth: 0
- name: set-version
run: .github/scripts/set_version.sh "${{ github.event.inputs.version }}"
- name: Setup GPG
id: setup-gpg
uses: nhatthm/gh-actions/import-gpg@master
with:
gpg_private_key: ${{ secrets.RELEASE_PRIVATE_KEY }}
passphrase: ${{ secrets.RELEASE_SECRET }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
git_tag_gpgsign: false
- name: Add and Commit
uses: nhatthm/gh-actions/git-add-and-commit@master
with:
add: version.go
message: "Release ${{ env.VERSION }}"
push: true
tag: "${{ env.VERSION }}"
author_name: ${{ steps.setup-gpg.outputs.name }}
author_email: ${{ steps.setup-gpg.outputs.email }}
committer_name: ${{ steps.setup-gpg.outputs.name }}
committer_email: ${{ steps.setup-gpg.outputs.email }}
- uses: nhatthm/gh-actions/github-release@master
with:
name: "${{ env.VERSION }}"
tag_name: "${{ env.VERSION }}"
generate_release_notes: true