mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
Some of the actions used in the release pipeline throw warnings about being outdated so they have been replaced. Looks like Github themself are no longer maintaining the actions around releases. The two Darwin builds have been collapsed into one action so there is only one machine and one git checkout and one upload action.
76 lines
2.4 KiB
YAML
76 lines
2.4 KiB
YAML
name: Release Builds
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*' # on every version tag
|
|
|
|
jobs:
|
|
# first just a small job to draft the release so all others can use the upload_url
|
|
create_release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: create release
|
|
id: create_release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
# only draft the release so changelog can be edited
|
|
draft: true
|
|
|
|
build_ubuntu:
|
|
runs-on: ubuntu-20.04
|
|
needs: create_release
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: build
|
|
run: bash .github/workflows/release.sh
|
|
- name: upload release assets linux
|
|
uses: AButler/upload-release-assets@v2.0
|
|
with:
|
|
files: 'agate.*.gz'
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
release-tag: ${{ github.ref }}
|
|
|
|
build_windows:
|
|
runs-on: windows-latest
|
|
needs: create_release
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Build
|
|
run: cargo build --verbose --release
|
|
- name: strip names
|
|
run: strip target/release/agate.exe
|
|
- name: compress
|
|
run: Compress-Archive -LiteralPath target/release/agate.exe -DestinationPath agate.x86_64-pc-windows-msvc.zip
|
|
- name: upload release asset win
|
|
uses: AButler/upload-release-assets@v2.0
|
|
with:
|
|
files: agate.x86_64-pc-windows-msvc.zip
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
release-tag: ${{ github.ref }}
|
|
|
|
build_macos_x86_64:
|
|
runs-on: macos-latest
|
|
needs: create_release
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: install toolchain
|
|
run: rustup target add aarch64-apple-darwin
|
|
- name: Build x86_64
|
|
run: cargo build --verbose --release
|
|
- name: strip names x86
|
|
run: strip target/release/agate
|
|
- name: compress x86
|
|
run: gzip -c target/release/agate > ./agate.x86_64-apple-darwin.gz
|
|
- name: Build ARM
|
|
run: SDKROOT=$(xcrun -sdk macosx --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version) cargo build --verbose --release --target=aarch64-apple-darwin
|
|
- name: strip names ARM
|
|
run: strip target/aarch64-apple-darwin/release/agate
|
|
- name: compress ARM
|
|
run: gzip -c target/aarch64-apple-darwin/release/agate > ./agate.aarch64-apple-darwin.gz
|
|
- name: upload release assets darwin
|
|
uses: AButler/upload-release-assets@v2.0
|
|
with:
|
|
files: 'agate.*.gz'
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
release-tag: ${{ github.ref }}
|