gen release notes #134
Workflow file for this run
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: | |
push: | |
tags: | |
- "*" | |
env: | |
CARGO_TERM_COLOR: always | |
MACOS_DEPLOYMENT_TARGET: 10.15 | |
jobs: | |
release_job: | |
name: Create release | |
runs-on: ubuntu-20.04 | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
release_id: ${{ steps.create_release.outputs.id }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
- name: Install kokai | |
run: cargo install kokai | |
- name: Make changelog | |
run: kokai release --ref ${{ github.ref }} > changes | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: true | |
body_path: ./changes | |
build_job: | |
name: Build release | |
needs: release_job | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macos-latest, ubuntu-latest] | |
rust: [stable] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ilammy/setup-nasm@v1 | |
- name: Install cargo cross | |
run: cargo install cross | |
if: matrix.os == 'ubuntu-latest' | |
- name: Cross-compile armv7 | |
run: | | |
cross build --release --target armv7-unknown-linux-gnueabihf --no-default-features | |
zip -r oculante_armv7_minimal.zip target/armv7-unknown-linux-gnueabihf/release/oculante | |
if: matrix.os == 'ubuntu-latest' | |
- name: Cross-compile arm64 | |
run: | | |
cross build --release --target aarch64-unknown-linux-gnu --no-default-features | |
zip -r oculante_aarch64_minimal.zip target/aarch64-unknown-linux-gnu/release/oculante | |
if: matrix.os == 'ubuntu-latest' | |
- name: Install cargo bundle | |
run: cargo install cargo-bundle | |
if: matrix.os == 'macos-latest' | |
- name: Install cargo universal2 | |
run: cargo install universal2 | |
if: matrix.os == 'macos-latest' | |
- name: Install cargo deb | |
run: cargo install cargo-deb | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Patch azure linux deps | |
run: sudo apt update | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Install libheif for ubuntu | |
run: | | |
./build_deps_linux.sh | |
cd libheif/build && sudo make install | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Update Rust | |
run: rustup update | |
- name: Install linux classic dependencies | |
run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev libgtk-3-dev libasound2-dev | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Install libheif for Windows | |
run: | | |
vcpkg integrate install | |
vcpkg install libheif:x64-windows-static-md | |
vcpkg install libheif:x64-windows-static | |
if: matrix.os == 'windows-2019' | |
- name: Build Windows Application | |
run: cargo build --release --features heif | |
if: matrix.os == 'windows-2019' | |
- name: Build Linux classic Application | |
run: | | |
cargo build --release --no-default-features | |
zip -r oculante_linux_minimal.zip target/release/oculante | |
cargo build --release --features heif | |
zip -r oculante_linux.zip target/release/oculante | |
cargo deb | |
cp target/debian/oculante_*.deb oculante.deb | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Build Mac Bundle | |
run: ./build_mac.sh | |
if: matrix.os == 'macos-latest' | |
- name: Zip Mac Bundle | |
run: mv target/release/bundle/osx/oculante.app . && zip -r oculante_app.zip oculante.app | |
if: matrix.os == 'macos-latest' | |
- name: Upload Linux 20.04 Release | |
if: matrix.os == 'ubuntu-20.04' | |
id: upload-release-asset-lin-classic | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release_job.outputs.upload_url }} | |
asset_path: target/release/oculante | |
asset_name: oculante_linux | |
asset_content_type: application/zip | |
- name: Upload ARMv7 Release | |
if: matrix.os == 'ubuntu-latest' | |
id: upload-release-arm | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release_job.outputs.upload_url }} | |
asset_path: oculante_armv7_minimal.zip | |
asset_name: oculante_armv7_minimal.zip | |
asset_content_type: application/zip | |
- name: Upload ARM64 Release | |
if: matrix.os == 'ubuntu-latest' | |
id: upload-release-arm64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release_job.outputs.upload_url }} | |
asset_path: oculante_aarch64_minimal.zip | |
asset_name: oculante_aarch64_minimal.zip | |
asset_content_type: application/zip | |
- name: Upload Linux 20.04 Release zip | |
if: matrix.os == 'ubuntu-20.04' | |
id: upload-release-asset-lin-classic-zip | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release_job.outputs.upload_url }} | |
asset_path: oculante_linux.zip | |
asset_name: oculante_linux.zip | |
asset_content_type: application/zip | |
- name: Upload Linux 20.04 Release minimal zip | |
if: matrix.os == 'ubuntu-20.04' | |
id: upload-release-asset-lin-classic-zip-min | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release_job.outputs.upload_url }} | |
asset_path: oculante_linux_minimal.zip | |
asset_name: oculante_linux_minimal.zip | |
asset_content_type: application/zip | |
- name: Upload Linux 20.04 deb | |
if: matrix.os == 'ubuntu-20.04' | |
id: upload-release-asset-lin-classic-deb | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release_job.outputs.upload_url }} | |
asset_path: oculante.deb | |
asset_name: oculante-${{ github.ref_name }}.deb | |
asset_content_type: application/zip | |
- name: Upload Mac Release | |
if: matrix.os == 'macos-latest' | |
id: upload-release-asset-mac | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release_job.outputs.upload_url }} | |
asset_path: oculante_app.zip | |
asset_name: oculante_mac.zip | |
asset_content_type: application/zip | |
- name: Upload Mac Binary | |
if: matrix.os == 'macos-latest' | |
id: upload-release-asset-bin | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release_job.outputs.upload_url }} | |
asset_path: target/release/oculante | |
asset_name: oculante_mac | |
asset_content_type: application/zip | |
- name: Upload Windows 2019 Release exe | |
if: matrix.os == 'windows-2019' | |
id: upload-release-asset-windows-classic | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release_job.outputs.upload_url }} | |
asset_path: target/release/oculante.exe | |
asset_name: oculante.exe | |
asset_content_type: application/zip | |
publish_release: | |
name: Publish release | |
needs: [build_job, release_job] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Test id | |
run: echo "${{ needs.release_job.outputs.release_id }}" | |
- name: Test id 2 | |
run: echo "${{ needs.release_job.outputs.upload_url }}" | |
- name: Publish | |
uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ needs.release_job.outputs.release_id }} | |
aur-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Publish AUR package | |
uses: KSXGitHub/github-actions-deploy-aur@v2.7.0 | |
with: | |
pkgname: oculante | |
pkgbuild: ./PKGBUILD | |
commit_username: ${{ secrets.AUR_USERNAME }} | |
commit_email: ${{ secrets.AUR_EMAIL }} | |
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
commit_message: Update oculante AUR package | |
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519 |