-
Notifications
You must be signed in to change notification settings - Fork 23
39 lines (33 loc) · 1.2 KB
/
release_subctl_on_push.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
---
name: Release Subctl release-0.17
on:
push:
branches:
- release-0.17
permissions:
contents: write
jobs:
release-subctl-on-push:
if: github.repository_owner == 'submariner-io'
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- name: Generate subctl version
run: |
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "RELEASE=subctl-${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Generate the subctl release artifacts
run: make build-cross VERSION=${{ env.BRANCH }}
- name: Recreate the release with the updated artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release delete ${{ env.RELEASE }} -y || true
git push -d origin ${{ env.RELEASE }} || true
gh release create ${{ env.RELEASE }} dist/*.tar.xz --prerelease \
--title "Cutting Edge: ${{ env.BRANCH }}" \
--notes "Cutting edge binaries of \`subctl\` for '${{ env.BRANCH }}' branch, always updated to the latest merged code." \
--target ${GITHUB_SHA}