mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
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@v4
|
|
- 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@v4
|
|
- 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@v4
|
|
- 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 }}
|