Skip to content

Publish

Publish #5

Workflow file for this run

name: Publish
on:
push:
tags:
- "*"
workflow_dispatch:
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
jobs:
publish:
strategy:
matrix:
include:
- build: linux-x86
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: linux-i686
os: ubuntu-latest
target: i686-unknown-linux-gnu
- build: linux-aarch64
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
- build: windows-x86
os: windows-latest
target: x86_64-pc-windows-msvc
- build: windows-i686
os: windows-latest
target: i686-pc-windows-msvc
- build: windows-aarch64
os: windows-latest
target: aarch64-pc-windows-msvc
- build: macos-x86
os: macos-latest
target: x86_64-apple-darwin
- build: macos-aarch64
os: macos-latest
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install packages (Linux)
if: runner.os == 'Linux'
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
with:
packages: libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev libgtk-3-dev # libgtk-3-dev is used by rfd
version: 1.0
execute_install_scripts: true
- uses: actions/setup-java@v4
with:
distribution: "microsoft"
java-version: "21"
cache: "gradle"
- uses: gradle/actions/wrapper-validation@v3
- uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: ${{ matrix.target }}
args: "--locked --release"
strip: true
- run: mv "target/${{ matrix.target }}/release/ornithe-installer-rs" "target/${{ matrix.target }}/release/ornithe-installer-rs.bin"
if: runner.os != 'Windows'
- uses: actions/upload-artifact@v4
with:
name: Artifacts ${{ matrix.target }}
path: |
target/${{ matrix.target }}/release/ornithe-installer-rs*
!target/**/ornithe-installer-rs.d
!target/**/build/
- run: ./gradlew publish --stacktrace
env:
MAVEN_URL: ${{ secrets.NEW_MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.NEW_MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.NEW_MAVEN_PASSWORD }}
TARGET: ${{ matrix.target }}
OS: ${{ matrix.os }}
- run: ./gradlew publish --stacktrace
env:
SNAPSHOTS_URL: ${{ secrets.NEW_MAVEN_SNAPSHOT_URL }}
SNAPSHOTS_USERNAME: ${{ secrets.NEW_MAVEN_SNAPSHOT_USERNAME }}
SNAPSHOTS_PASSWORD: ${{ secrets.NEW_MAVEN_SNAPSHOT_PASSWORD }}
TARGET: ${{ matrix.target }}
OS: ${{ matrix.build }}