-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Early sketches of a CI-based release pipeline
- large restructuring of the Justfile release commands - sketch of a release action
- Loading branch information
1 parent
b92b269
commit fb8ab01
Showing
2 changed files
with
84 additions
and
22 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release: | ||
name: Release build ${{ matrix.target }} | ||
runs-on: ${{ matrix.runner }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- target: x86_64-pc-windows-msvc | ||
runner: windows-latest | ||
archive: zip | ||
- target: x86_64-unknown-linux-musl | ||
runner: ubuntu-latest | ||
archive: tar.xz | ||
- target: x86_64-apple-darwin | ||
runner: macos-latest | ||
archive: tar.xz | ||
- target: aarch64-apple-darwin | ||
runner: macos-latest | ||
archive: tar.xz | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install latest nightly | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
profile: minimal | ||
- name: Install just | ||
uses: extractions/setup-just@v2 | ||
|
||
- name: Install nextest (Linux) | ||
if: ${{ matrix.runner == 'ubuntu-latest' }} | ||
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | ||
- name: Install nextest (macOS) | ||
if: ${{ matrix.runner == 'macos-latest' }} | ||
run: curl -LsSf https://get.nexte.st/latest/mac | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | ||
- name: Install nextest (Windows) | ||
if: ${{ matrix.runner == 'windows-latest' }} | ||
run: | | ||
$tmp = New-TemporaryFile | Rename-Item -NewName { $_ -replace 'tmp$', 'zip' } -PassThru | ||
Invoke-WebRequest -OutFile $tmp https://get.nexte.st/latest/windows | ||
$outputDir = if ($Env:CARGO_HOME) { Join-Path $Env:CARGO_HOME "bin" } else { "~/.cargo/bin" } | ||
$tmp | Expand-Archive -DestinationPath $outputDir -Force | ||
$tmp | Remove-Item | ||
- name: Build release artifacts | ||
run: just release ${{ github.ref }} ${{ matrix.target }} | ||
|
||
- name: Upload release asset | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: spcasm-${{ github.ref }}-${{ matrix.target }}.${{ matrix.archive }} |
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