forked from riscv-software-src/riscv-isa-sim
-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (51 loc) · 1.55 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: release
on:
release:
types: [created]
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- stable
os:
- ubuntu:18.04
- almalinux:8.7
steps:
- uses: actions/checkout@v3
- name: OS Build
run: |
export full_tgtname=${{ matrix.os }}
export tgtname=$(echo ${{ matrix.os }} | tr -d ':')
.github/scripts/gen_dockerfile.sh
docker build ./ -t $tgtname
shell: bash
- name: Create package
run: |
export tgtname=$(echo ${{ matrix.os }} | tr -d ':')
docker run \
-t --rm \
-v "$GITHUB_WORKSPACE:/source" \
$tgtname \
.github/scripts/build_spike_dasm.sh;
.github/scripts/package.sh $tgtname;
shell: bash
- name: Get Artifact Name
run: |
ARTIFACT_PATHNAME=$(ls ./snitch-spike-dasm-*.tar.gz | head -n 1)
ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME)
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV
shell: bash
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ARTIFACT_PATHNAME }}
asset_name: ${{ env.ARTIFACT_NAME }}
asset_content_type: application/tar.gz