Skip to content

chore: Release jenkins version 0.1.10 #24

chore: Release jenkins version 0.1.10

chore: Release jenkins version 0.1.10 #24

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
release-corss:
runs-on: ubuntu-20.04
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu # x86_64 Linux (GNU)
- x86_64-unknown-linux-musl # x86_64 Linux (musl)
- x86_64-pc-windows-gnu # Windows (MinGW)
- aarch64-unknown-linux-gnu # ARM64 Linux (GNU)
- aarch64-unknown-linux-musl # ARM64 Linux (musl)
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build
run: cross build --release --target=${{ matrix.target }}
- name: Package
run: |
if [[ "${{ matrix.target }}" == *"-windows-"* ]]; then
tar -czf jenkins-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release jenkins.exe
else
tar -czf jenkins-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release jenkins
fi
- name: Upload
uses: actions/upload-artifact@v4
with:
name: jenkins-${{ matrix.target }}
path: jenkins-${{ matrix.target }}.*
release-windows:
runs-on: windows-latest
strategy:
matrix:
target:
- x86_64-pc-windows-msvc # Windows (MSVC)
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
run: cargo build --release --target=${{ matrix.target }}
- name: Package
run: tar -czf jenkins-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release jenkins.exe
- name: Upload
uses: actions/upload-artifact@v4
with:
name: jenkins-${{ matrix.target }}
path: jenkins-${{ matrix.target }}.*
release-apple:
runs-on: macos-latest
strategy:
matrix:
target:
- x86_64-apple-darwin # Intel Mac
- aarch64-apple-darwin # M1/M2 Mac
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
run: cargo build --release --target=${{ matrix.target }}
- name: Package
run: tar -czf jenkins-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release jenkins
- name: Upload
uses: actions/upload-artifact@v4
with:
name: jenkins-${{ matrix.target }}
path: jenkins-${{ matrix.target }}.*
# release-wasm:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# with:
# targets: wasm32-unknown-unknown
# - name: install wasm-pack
# run: cargo install wasm-pack
# - name: Build
# run: wasm-pack build --target web
create-release:
needs: [release-corss, release-windows, release-apple]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: jenkins-*
merge-multiple: true
- name: List artifacts
run: find artifacts -type f
- name: Delete existing release
uses: dev-drprasad/[email protected]
with:
tag_name: ${{ github.ref_name }}
delete_release: true
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: artifacts/*
# "Settings" > "Actions" > "General"
# "Workflow permissions" > "Read and write permissions"