-
Notifications
You must be signed in to change notification settings - Fork 64
47 lines (41 loc) · 1.23 KB
/
release-staging.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
name: pre-release-staging
on:
push:
branches:
- staging
permissions:
contents: write
packages: write
jobs:
goreleaser:
runs-on: ubuntu-latest
container: kraftkit.sh/myself-full:latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Fetch all tags
run: |
git config --global --add safe.directory /__w/kraftkit/kraftkit
git fetch --force --tags
- name: Generate GoReleaser configuration
run: |
ytt -f .goreleaser-staging.yaml > goreleaser-staging.yaml
- name: Run GoReleaser
run: |
git tag -d "$(git describe)" || true
git config user.name "Unikraft Bot"
git config user.email "monkey@unikraft.io"
git tag -a "$(git describe)" -m "Pre-release: $(git describe)"
echo "$GOOGLE_APPLICATION_JSON" > /tmp/gs.json
goreleaser build \
--config goreleaser-staging.yaml \
--skip-validate
goreleaser release \
--config goreleaser-staging.yaml \
--rm-dist \
--skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}