Skip to content

release

release #2

Workflow file for this run

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