just run it on ubuntu-latest #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile and publish libnvram | |
on: | |
push: | |
branches: | |
- master | |
- stable | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get next version | |
uses: reecetech/[email protected] | |
id: version | |
with: | |
use_api: true | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- 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 }} |