-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (39 loc) · 1.22 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
name: Release
on:
release:
types: [published]
jobs:
build:
name: Release
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v2
# workaround as there is no way to get the Release name or just the tag name by itself
- name: Extract branch name
shell: bash
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
id: extract_tag
- name: Build Lab Image
env:
VERSION: ${{ steps.extract_tag.outputs.tag }}
run: |
make build version=$VERSION
- name: Prune dangling images
run: docker image prune -f
- name: Login to GitHub Package Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish version to GitHub Package Registry
env:
VERSION: ${{ steps.extract_tag.outputs.tag }}
run: |
make release version=$VERSION
- name: Upload Release Assets
uses: AButler/[email protected]
with:
files: './workshop-resources/*/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}