forked from alxhlz/hcloud-failover-keepalived
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (65 loc) · 2.27 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
61
62
63
64
65
66
67
68
69
70
name: Build pex & deb for release
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: "0"
# pulls all tags (needed for lerna / semantic release to correctly version)
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
- run: nix-channel --update
- run: ./pex.sh
- run: ./deb.sh
- name: Store pex
uses: actions/upload-artifact@v3
with:
name: pex
path: robot_failover.pex
- name: Store deb
uses: actions/upload-artifact@v3
with:
name: deb
path: robot_failover.deb
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.cversion.outputs.version }}
release_name: Release v${{ steps.cversion.outputs.version }}
body: |
Install from mgit dpkg repo once released there
draft: false
prerelease: false
- name: Upload Release Asset .deb
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: robot_failover.deb
asset_name: robot-failover-${{ steps.cversion.outputs.version }}.deb
asset_content_type: application/vnd.debian.binary-package
- name: Upload Release Asset .pex
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: robot_failover.pex
asset_name: robot-failover-${{ steps.cversion.outputs.version }}.pex
asset_content_type: application/zip