Skip to content

0.133.1 Release reprise #49

0.133.1 Release reprise

0.133.1 Release reprise #49

name: Publish Apple Silicon
on:
push:
tags:
- '*'
workflow_dispatch:
env:
QSV_KIND: prebuilt
jobs:
analyze-tags:
runs-on: ubuntu-22.04
outputs:
previous-tag: ${{ steps.previoustag.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
#▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼#
- name: Get previous tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
#▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲#
publish:
name: Publish for ${{ matrix.job.target }}
needs: analyze-tags
runs-on: self-hosted
# runs-on: macos-latest
strategy:
matrix:
rust: [stable]
job:
- os: macos
os-name: macos
target: aarch64-apple-darwin
architecture: aarch64
use-cross: false
addl-build-args: --features=apply,fetch,foreach,self_update,luau,polars,to,geocode
default-features:
addl-qsvlite-features:
addl-qsvdp-features: luau
steps:
- name: Installing Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
target: ${{ matrix.job.target }}
override: true
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ needs.analyze-tags.outputs.previous-tag }}
- name: Build qsv
env:
RUSTFLAGS: --emit=asm -C target-cpu=native
uses: actions-rs/cargo@v1
with:
command: build
use-cross: ${{ matrix.job.use-cross }}
toolchain: ${{ matrix.rust }}
args: --release --locked --bin qsv --target ${{ matrix.job.target }} ${{ matrix.job.addl-build-args }},feature_capable ${{ matrix.job.default-features }}
- name: Build qsvlite
env:
RUSTFLAGS: --emit=asm -C target-cpu=native
uses: actions-rs/cargo@v1
with:
command: build
use-cross: ${{ matrix.job.use-cross }}
toolchain: ${{ matrix.rust }}
args: --release --locked --bin qsvlite --features=lite,self_update,${{ matrix.job.addl-qsvlite-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }}
- name: Build qsvdp
env:
RUSTFLAGS: --emit=asm -C target-cpu=native
uses: actions-rs/cargo@v1
with:
command: build
use-cross: ${{ matrix.job.use-cross }}
toolchain: ${{ matrix.rust }}
args: --release --locked --bin qsvdp --features=datapusher_plus,${{ matrix.job.addl-qsvdp-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }}
- name: Copy binaries to working dir
shell: bash
run: |
mkdir qsv-${{ needs.analyze-tags.outputs.previous-tag }}
rm target/${{ matrix.job.target }}/release/*.d
cp -v target/${{ matrix.job.target }}/release/qsv* qsv-${{ needs.analyze-tags.outputs.previous-tag }}
- name: Create README
shell: bash
run: |
cat docs/publishing_assets/README.txt docs/publishing_assets/qsv-${{ matrix.job.target }}.txt > qsv-${{ needs.analyze-tags.outputs.previous-tag }}/README
- name: install 7zip
run: brew install sevenzip
- name: zip up binaries
run: 7zz a -tzip qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip ./qsv-${{ needs.analyze-tags.outputs.previous-tag }}/* -mx=9 -mmt=on
- name: install zipsign
run: |
cargo install zipsign
- name: Fetch zipsign private key
uses: mobiledevops/secret-to-file-action@v1
with:
base64-encoded-secret: ${{ secrets.QSV_ZIPSIGN_PRIV_KEY }}
filename: "qsvpriv.key"
is-executable: false
working-directory: "."
- name: zipsign binary
run: |
zipsign sign zip qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip qsvpriv.key
cp -v qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip /tmp
- name: Upload zipped binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip
asset_name: qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip
overwrite: true
tag: ${{ needs.analyze-tags.outputs.previous-tag }}