forked from rancher/os
-
Notifications
You must be signed in to change notification settings - Fork 14
40 lines (34 loc) · 1.12 KB
/
create-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
name: release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Install github-release
run: |
sudo wget https://github.com/github-release/github-release/releases/download/v0.9.0/linux-amd64-github-release.bz2 -O /usr/local/bin/github-release.bz2
sudo bunzip2 /usr/local/bin/github-release.bz2
sudo chmod 0755 /usr/local/bin/github-release
- name: Build OS
run: |
export VERSION=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))
if [ -z "$VERSION" ]; then
echo "Build is not started from tag. Will exit..."
exit 1
fi
export OS_FIRMWARE=${{ github.event.inputs.firmware }}
export ARCH=amd64
make release
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish release
run: ${PWD}/dist/publish.sh
env:
GITHUB_TOKEN: ${{ secrets.OS_RELEASE_TOKEN }}