This repository was archived by the owner on Mar 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (44 loc) · 1.44 KB
/
release.yml
File metadata and controls
52 lines (44 loc) · 1.44 KB
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
name: Release workflow
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.5
- name: Cache
uses: actions/cache@v2.1.7
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: out
# An explicit key for restoring and saving the cache
key: cachego
- name: Build
run: ./BUILD.sh
- name: Get release upload URL
run: |
upload_url=$(curl -sL https://api.github.com/repos/StopModReposts/List-Utils/releases/latest | jq -r '.upload_url')
echo UPLOAD_URL=$upload_url >> $GITHUB_ENV
- name: Upload release ELF
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: out/smr-list-utils.elf
asset_name: smr-list-utils.elf
asset_content_type: application/x-executable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release EXE
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: out/smr-list-utils.exe
asset_name: smr-list-utils.exe
asset_content_type: application/x-dosexec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}