Release #11
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: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tiron_version: | |
description: "Tiron version for release" | |
required: true | |
push: | |
tags: | |
- "v*" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update toolchain | |
run: | | |
rustup update | |
- name: Install ARM target | |
run: rustup target add aarch64-unknown-linux-gnu | |
- name: Install ARM gcc | |
run: sudo apt install -y gcc-aarch64-linux-gnu | |
- name: Fetch dependencies | |
run: cargo fetch --locked | |
- name: Build tiron | |
run: | | |
RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" cargo build -p tiron --release --locked --target aarch64-unknown-linux-gnu | |
cargo build -p tiron --release --locked --target x86_64-unknown-linux-gnu | |
- name: Build tiron-node | |
run: | | |
RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" cargo build -p tiron-node --release --locked --target aarch64-unknown-linux-gnu | |
cargo build -p tiron-node --release --locked --target x86_64-unknown-linux-gnu | |
- name: Build tiron-lsp | |
run: | | |
RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" cargo build -p tiron-lsp --release --locked --target aarch64-unknown-linux-gnu | |
cargo build -p tiron-lsp --release --locked --target x86_64-unknown-linux-gnu | |
- name: Gzip | |
run: | | |
gzip -c ./target/x86_64-unknown-linux-gnu/release/tiron > ./tiron-${{ github.event.inputs.tiron_version }}-linux-amd64.gz | |
gzip -c ./target/aarch64-unknown-linux-gnu/release/tiron > ./tiron-${{ github.event.inputs.tiron_version }}-linux-arm64.gz | |
gzip -c ./target/x86_64-unknown-linux-gnu/release/tiron-node > ./tiron-node-${{ github.event.inputs.tiron_version }}-linux-amd64.gz | |
gzip -c ./target/aarch64-unknown-linux-gnu/release/tiron-node > ./tiron-node-${{ github.event.inputs.tiron_version }}-linux-arm64.gz | |
gzip -c ./target/x86_64-unknown-linux-gnu/release/tiron-lsp > ./tiron-lsp-${{ github.event.inputs.tiron_version }}-linux-amd64.gz | |
gzip -c ./target/aarch64-unknown-linux-gnu/release/tiron-lsp > ./tiron-lsp-${{ github.event.inputs.tiron_version }}-linux-arm64.gz | |
cp ./.github/scripts/install.sh ./install.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: tiron-linux | |
path: | | |
./tiron-${{ github.event.inputs.tiron_version }}-linux-amd64.gz | |
./tiron-${{ github.event.inputs.tiron_version }}-linux-arm64.gz | |
./tiron-node-${{ github.event.inputs.tiron_version }}-linux-amd64.gz | |
./tiron-node-${{ github.event.inputs.tiron_version }}-linux-arm64.gz | |
./tiron-lsp-${{ github.event.inputs.tiron_version }}-linux-amd64.gz | |
./tiron-lsp-${{ github.event.inputs.tiron_version }}-linux-arm64.gz | |
./install.sh | |
retention-days: 1 | |
macos: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install ARM target | |
run: rustup update && rustup target add aarch64-apple-darwin | |
- name: Import Certificate | |
uses: lapce/import-codesign-certs@72dec84923586f8bef2bed09fdb4f9475c8f623d # use updated action, can be dropped once/if upstream is fixed | |
with: | |
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} | |
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
- name: Fetch dependencies | |
run: cargo fetch --locked | |
- name: Build tiron | |
run: | | |
cargo build -p tiron --release --locked --target aarch64-apple-darwin | |
cargo build -p tiron --release --locked --target x86_64-apple-darwin | |
- name: Build tiron-node | |
run: | | |
cargo build -p tiron-node --release --locked --target aarch64-apple-darwin | |
cargo build -p tiron-node --release --locked --target x86_64-apple-darwin | |
- name: Build tiron-lsp | |
run: | | |
cargo build -p tiron-lsp --release --locked --target aarch64-apple-darwin | |
cargo build -p tiron-lsp --release --locked --target x86_64-apple-darwin | |
- name: codesign | |
run: | | |
/usr/bin/codesign -vvv --deep --strict --options=runtime --force -s ADD049AE64FD743A8E91A47525EFED47153971CB ./target/x86_64-apple-darwin/release/tiron | |
/usr/bin/codesign -vvv --deep --strict --options=runtime --force -s ADD049AE64FD743A8E91A47525EFED47153971CB ./target/aarch64-apple-darwin/release/tiron | |
/usr/bin/codesign -vvv --deep --strict --options=runtime --force -s ADD049AE64FD743A8E91A47525EFED47153971CB ./target/x86_64-apple-darwin/release/tiron-node | |
/usr/bin/codesign -vvv --deep --strict --options=runtime --force -s ADD049AE64FD743A8E91A47525EFED47153971CB ./target/aarch64-apple-darwin/release/tiron-node | |
/usr/bin/codesign -vvv --deep --strict --options=runtime --force -s ADD049AE64FD743A8E91A47525EFED47153971CB ./target/x86_64-apple-darwin/release/tiron-lsp | |
/usr/bin/codesign -vvv --deep --strict --options=runtime --force -s ADD049AE64FD743A8E91A47525EFED47153971CB ./target/aarch64-apple-darwin/release/tiron-lsp | |
- name: Notarize Release Build | |
uses: lando/notarize-action@v2 | |
with: | |
product-path: "./target/x86_64-apple-darwin/release/tiron" | |
appstore-connect-username: ${{ secrets.NOTARIZE_USERNAME }} | |
appstore-connect-password: ${{ secrets.NOTARIZE_PASSWORD }} | |
appstore-connect-team-id: CYSGAZFR8D | |
primary-bundle-id: "io.tiron" | |
- name: Notarize Release Build | |
uses: lando/notarize-action@v2 | |
with: | |
product-path: "./target/aarch64-apple-darwin/release/tiron" | |
appstore-connect-username: ${{ secrets.NOTARIZE_USERNAME }} | |
appstore-connect-password: ${{ secrets.NOTARIZE_PASSWORD }} | |
appstore-connect-team-id: CYSGAZFR8D | |
primary-bundle-id: "io.tiron" | |
- name: Gzip | |
run: | | |
gzip -c ./target/x86_64-apple-darwin/release/tiron > ./tiron-${{ github.event.inputs.tiron_version }}-darwin-amd64.gz | |
gzip -c ./target/aarch64-apple-darwin/release/tiron > ./tiron-${{ github.event.inputs.tiron_version }}-darwin-arm64.gz | |
gzip -c ./target/x86_64-apple-darwin/release/tiron-node > ./tiron-node-${{ github.event.inputs.tiron_version }}-darwin-amd64.gz | |
gzip -c ./target/aarch64-apple-darwin/release/tiron-node > ./tiron-node-${{ github.event.inputs.tiron_version }}-darwin-arm64.gz | |
gzip -c ./target/x86_64-apple-darwin/release/tiron-lsp > ./tiron-lsp-${{ github.event.inputs.tiron_version }}-darwin-amd64.gz | |
gzip -c ./target/aarch64-apple-darwin/release/tiron-lsp > ./tiron-lsp-${{ github.event.inputs.tiron_version }}-darwin-arm64.gz | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: tiron-macos | |
path: | | |
./tiron-${{ github.event.inputs.tiron_version }}-darwin-amd64.gz | |
./tiron-${{ github.event.inputs.tiron_version }}-darwin-arm64.gz | |
./tiron-node-${{ github.event.inputs.tiron_version }}-darwin-amd64.gz | |
./tiron-node-${{ github.event.inputs.tiron_version }}-darwin-arm64.gz | |
./tiron-lsp-${{ github.event.inputs.tiron_version }}-darwin-amd64.gz | |
./tiron-lsp-${{ github.event.inputs.tiron_version }}-darwin-arm64.gz | |
retention-days: 1 | |
windows: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update rust | |
run: rustup update && rustup target add aarch64-pc-windows-msvc | |
- name: Fetch dependencies | |
run: cargo fetch --locked | |
- name: Build tiron | |
run: | | |
cargo build -p tiron --release --locked --target aarch64-pc-windows-msvc | |
cargo build -p tiron --release --locked --target x86_64-pc-windows-msvc | |
- name: Build tiron-node | |
run: | | |
cargo build -p tiron-node --release --locked --target aarch64-pc-windows-msvc | |
cargo build -p tiron-node --release --locked --target x86_64-pc-windows-msvc | |
- name: Build tiron-lsp | |
run: | | |
cargo build -p tiron-lsp --release --locked --target aarch64-pc-windows-msvc | |
cargo build -p tiron-lsp --release --locked --target x86_64-pc-windows-msvc | |
- name: Gzip | |
run: | | |
gzip -c ./target/x86_64-pc-windows-msvc/release/tiron > ./tiron-${{ github.event.inputs.tiron_version }}-windows-amd64.gz | |
gzip -c ./target/aarch64-pc-windows-msvc/release/tiron > ./tiron-${{ github.event.inputs.tiron_version }}-windows-arm64.gz | |
gzip -c ./target/x86_64-pc-windows-msvc/release/tiron-node > ./tiron-node-${{ github.event.inputs.tiron_version }}-windows-amd64.gz | |
gzip -c ./target/aarch64-pc-windows-msvc/release/tiron-node > ./tiron-node-${{ github.event.inputs.tiron_version }}-windows-arm64.gz | |
gzip -c ./target/x86_64-pc-windows-msvc/release/tiron-lsp > ./tiron-lsp-${{ github.event.inputs.tiron_version }}-windows-amd64.gz | |
gzip -c ./target/aarch64-pc-windows-msvc/release/tiron-lsp > ./tiron-lsp-${{ github.event.inputs.tiron_version }}-windows-arm64.gz | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: tiron-windows | |
path: | | |
./tiron-${{ github.event.inputs.tiron_version }}-windows-amd64.gz | |
./tiron-${{ github.event.inputs.tiron_version }}-windows-arm64.gz | |
./tiron-node-${{ github.event.inputs.tiron_version }}-windows-amd64.gz | |
./tiron-node-${{ github.event.inputs.tiron_version }}-windows-arm64.gz | |
./tiron-lsp-${{ github.event.inputs.tiron_version }}-windows-amd64.gz | |
./tiron-lsp-${{ github.event.inputs.tiron_version }}-windows-arm64.gz | |
retention-days: 1 | |
publish: | |
runs-on: ubuntu-latest | |
needs: | |
- linux | |
- macos | |
- windows | |
env: | |
GH_REPO: ${{ github.repository }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPO: ${{ github.repository }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
- if: github.event_name == 'workflow_dispatch' | |
run: echo "TAG_NAME=v${{ github.event.inputs.tiron_version }}" >> $GITHUB_ENV | |
- name: Publish release | |
if: github.event_name != 'pull_request' | |
run: | | |
gh release create $TAG_NAME --title "$TAG_NAME" --target $GITHUB_SHA \ | |
tiron-linux/* \ | |
tiron-macos/* \ | |
tiron-windows/* \ |