forked from firmadyne/libnvram
-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (54 loc) · 1.77 KB
/
build.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Compile and publish libnvram
on:
push:
branches:
- master
- stable
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get next version
uses: reecetech/[email protected]
id: version
with:
use_api: true
- name: Build
run: |
docker run --rm -v $PWD:/app -w /app ghcr.io/panda-re/embedded-toolchains_rust:latest /app/package.sh
- name: Save package
uses: actions/upload-artifact@v3
with:
name: libnvram-latest.tar.gz
path: libnvram-latest.tar.gz
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.v-version }}${{ github.ref == 'refs/head/stable' && '-stable' || '' }}
release_name: Release ${{ steps.version.outputs.v-version }} ${{ github.ref }}
body: |
Release ${{ steps.version.outputs.v-version }} @${{ github.ref }}
draft: true
prerelease: false
- name: 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: ./libnvram-latest.tar.gz
asset_name: libnvram-latest.tar.gz
asset_content_type: application/gzip
- name: Publish release
uses: StuYarrow/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ steps.create_release.outputs.id }}