Skip to content

Commit b5b0662

Browse files
committed
ci(deb): fetch version, import gpg key, package deb
1 parent d593bfd commit b5b0662

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,29 @@ jobs:
3636
uses: actions/checkout@v2
3737
with:
3838
fetch-depth: 0
39-
- name: Set up Go
40-
uses: actions/setup-go@v2
41-
with:
42-
go-version: 1.17
43-
- name: Add packaging config to goreleaser config
44-
run: cat .goreleaser.pkg.yml >> .goreleaser.yml
39+
- name: Get tag
40+
id: get_tag
41+
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
42+
- name: Get version
43+
id: get_version
44+
run: echo ::set-output name=VERSION::${TAG##v}
45+
env:
46+
TAG: ${{ steps.get_tag.outputs.TAG }}
4547
- name: create gpg key
4648
run: echo "${GPG_KEY}" > /root/gpg
4749
env:
4850
GPG_KEY: ${{ secrets.GPG_KEY }}
51+
- name: import gpg key
52+
run: gpg --pinentry-mode=loopback --passphrase "$GPG_PASSPHRASE" --import /root/gpg
53+
env:
54+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
55+
- name: Install make
56+
run: apt install make -y
4957
- name: Build and package deb
50-
run: ./goreleaser release --skip-validate --rm-dist --skip-publish
51-
# - name: Build and package deb
52-
# uses: goreleaser/goreleaser-action@v2
53-
# with:
54-
# version: latest
55-
# args: release --skip-validate --rm-dist --skip-publish
58+
run: make deb-source
5659
env:
57-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58-
GPG_KEY: '/root/gpg'
60+
VERSION: ${{ steps.get_version.outputs.VERSION }}
61+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
5962
package-rpm:
6063
runs-on: ubuntu-latest
6164
container: fedora:latest

0 commit comments

Comments
 (0)