Skip to content

v0.10.0

v0.10.0 #7

Workflow file for this run

name: Release
on:
push:
tags: '*'
permissions:
contents: write
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
env:
CARGO: cargo
RUST_BACKTRACE: 1
strategy:
fail-fast: false
matrix:
include:
- build: linux
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
- build: macos
os: macos-latest
rust: stable
target: x86_64-apple-darwin
- build: macos
os: macos-latest
rust: stable
target: aarch64-apple-darwin
- build: win64-msvc
os: windows-latest
rust: stable
target: x86_64-pc-windows-msvc
- build: win64-gnu
os: windows-latest
rust: stable-x86_64-gnu
target: x86_64-pc-windows-gnu
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build applications
shell: bash
run: |
CARGO_PROFILE_RELEASE_STRIP=symbols ${{ env.CARGO }} build \
--verbose \
--target ${{ matrix.target }} \
--release
if [ "${{ matrix.os }}" = "windows-latest" ]; then
rtcmjson="target/${{ matrix.target }}/release/rtcm-json.exe"
else
rtcmjson="target/${{ matrix.target }}/release/rtcm-json"
fi
echo "RTCMJSON=$rtcmjson" >> $GITHUB_ENV
- name: Determine archive name
shell: bash
run: |
echo "ARCHIVE=rtcm-json-${{ github.ref_name }}-${{ matrix.target }}" >> $GITHUB_ENV
- name: Creating directory for archive
shell: bash
run: |
mkdir -p "$ARCHIVE"
cp {README.md,LICENSE-MIT,LICENSE-APACHE} "$ARCHIVE"/
cp "$RTCMJSON" "$ARCHIVE"/
- name: Gzip archive (Unix)
shell: bash
if: matrix.os != 'windows-latest'
run: |
tar czf "$ARCHIVE.tar.gz" "$ARCHIVE"
shasum -a 256 "$ARCHIVE.tar.gz" > "$ARCHIVE.tar.gz.sha256"
echo "ASSET=$ARCHIVE.tar.gz" >> $GITHUB_ENV
echo "ASSET_SUM=$ARCHIVE.tar.gz.sha256" >> $GITHUB_ENV
- name: Zip archive (Windows)
shell: bash
if: matrix.os == 'windows-latest'
run: |
7z a "$ARCHIVE.zip" "$ARCHIVE"
certutil -hashfile "$ARCHIVE.zip" SHA256 > "$ARCHIVE.zip.sha256"
echo "ASSET=$ARCHIVE.zip" >> $GITHUB_ENV
echo "ASSET_SUM=$ARCHIVE.zip.sha256" >> $GITHUB_ENV
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ASSET }}
path: |
${{ env.ASSET }}
${{ env.ASSET_SUM }}
compression-level: 0
release:
runs-on: ubuntu-latest
permissions:
contents: write
needs: ['build']
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Create Release
uses: ncipollo/release-action@v1
with:
draft: true
artifacts: "*"