-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (54 loc) · 2 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
#
# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `GPG_PASSPHRASE`
# secret. If you would rather own your own GPG handling, please fork this action
# or use an alternative one for key handling.
#
# You will need to pass the `--batch` flag to `gpg` in your signing step
# in `goreleaser` to indicate this is being used in a non-interactive mode.
#
name: release
on:
workflow_dispatch:
push:
tags: ['v*']
permissions:
contents: write
packages: write
jobs:
goreleaser:
runs-on: ubuntu-latest
container: kraftkit.sh/myself-full:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Update packages
run: |
apt-get install -y --no-install-recommends jq
- name: Fetch all tags
run: |
git config --global --add safe.directory /__w/packer-plugin-unikraft/packer-plugin-unikraft
git fetch --force --tags
- name: Describe plugin
id: plugin_describe
run: echo "::set-output name=api_version::$(go run -tags 'containers_image_storage_stub,containers_image_openpgp' . describe | jq -r '.api_version')"
- name: Run GoReleaser
run: |
goreleaser build \
--config .goreleaser.yml \
--skip=validate
goreleaser release \
--config .goreleaser.yml \
--clean --skip=validate \
--skip=sign
env:
API_VERSION: ${{ steps.plugin_describe.outputs.api_version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SIGNORE_CLIENT_ID: ${{ secrets.SIGNORE_CLIENT_ID }}
SIGNORE_CLIENT_SECRET: ${{ secrets.SIGNORE_CLIENT_SECRET }}
SIGNORE_SIGNER: ${{ secrets.SIGNORE_SIGNER }}