Skip to content

chore: 👽 switch to the legit curse api key #40

chore: 👽 switch to the legit curse api key

chore: 👽 switch to the legit curse api key #40

Workflow file for this run

name: Generate executables and post them to release
on:
push:
tags:
- "cli-*"
workflow_dispatch:
permissions:
contents: write
jobs:
generate-windows-executables:
name: Build & publish for ${{ matrix.target }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
target:
- x86_64-pc-windows-msvc
- aarch64-pc-windows-msvc
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Get flowupdater-json-creator version
id: flowupdater_json_creator_version
shell: pwsh
run: |
$version = (Get-Content .\projects\cli\Cargo.toml | Select-String -Pattern '^\s*version\s*=\s*"(\d+\.\d+\.\d+)"' | ForEach-Object { $_.Matches.Groups[1].Value })
echo "APP_VERSION=$version" >> $env:GITHUB_OUTPUT
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build release
run: |
cargo build --bin flowupdater-json-creator --release --locked --target ${{ matrix.target }}
mv ./target/${{ matrix.target }}/release/flowupdater-json-creator.exe ./flowupdater-json-creator-${{ steps.flowupdater_json_creator_version.outputs.APP_VERSION }}-${{ matrix.target }}.exe
- name: Upload executable to release
uses: softprops/action-gh-release@v1
with:
files: flowupdater-json-creator-${{ steps.flowupdater_json_creator_version.outputs.APP_VERSION }}-${{ matrix.target }}.exe
tag_name: ${{ steps.flowupdater_json_creator_version.outputs.APP_VERSION }}
generate-linux-freebsd-executables:
name: Build & publish for ${{ matrix.target }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
rust:
- stable
target:
- x86_64-unknown-freebsd
- i686-unknown-freebsd
- aarch64-unknown-linux-gnu
- arm-unknown-linux-gnueabi
- armv7-unknown-linux-gnueabi
- armv7-unknown-linux-gnueabihf
- i586-unknown-linux-gnu
- i686-unknown-linux-gnu
- mips-unknown-linux-gnu
- mips64-unknown-linux-gnuabi64
- mips64el-unknown-linux-gnuabi64
- mipsel-unknown-linux-gnu
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- i686-unknown-linux-musl
- aarch64-unknown-linux-musl
- arm-unknown-linux-musleabi
- arm-unknown-linux-musleabihf
- armv5te-unknown-linux-musleabi
- armv7-unknown-linux-musleabi
- armv7-unknown-linux-musleabihf
- i586-unknown-linux-musl
- mips-unknown-linux-musl
- mips64-unknown-linux-muslabi64
- mips64el-unknown-linux-muslabi64
- mipsel-unknown-linux-musl
- x86_64-unknown-linux-musl
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Rust
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Get flowupdater-json-creator version
id: flowupdater_json_creator_version
run: echo "APP_VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' projects/cli/Cargo.toml)" >> $GITHUB_OUTPUT
- name: Build release
run: |
cargo build --bin flowupdater-json-creator --release --locked --target ${{ matrix.target }}
mv ./target/${{ matrix.target }}/release/flowupdater-json-creator ./flowupdater-json-creator-${{ steps.flowupdater_json_creator_version.outputs.APP_VERSION }}-${{ matrix.target }}
- name: Upload executable to release
uses: softprops/action-gh-release@v1
with:
files: flowupdater-json-creator-${{ steps.flowupdater_json_creator_version.outputs.APP_VERSION }}-${{ matrix.target }}
tag_name: ${{ steps.flowupdater_json_creator_version.outputs.APP_VERSION }}
generate-macos-executables:
name: Build & publish for ${{ matrix.target }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
- name: Get flowupdater-json-creator version
id: flowupdater_json_creator_version
run: echo "APP_VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' projects/cli/Cargo.toml)" >> $GITHUB_OUTPUT
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build release
run: |
cargo build --bin flowupdater-json-creator --release --locked --target ${{ matrix.target }}
mv ./target/${{ matrix.target }}/release/flowupdater-json-creator ./flowupdater-json-creator-${{ steps.flowupdater_json_creator_version.outputs.APP_VERSION }}-${{ matrix.target }}
- name: Upload executable to release
uses: softprops/action-gh-release@v1
with:
files: flowupdater-json-creator-${{ steps.flowupdater_json_creator_version.outputs.APP_VERSION }}-${{ matrix.target }}
tag_name: ${{ steps.flowupdater_json_creator_version.outputs.APP_VERSION }}
create_changelog:
name: Generate changelog
runs-on: ubuntu-latest
steps:
- name: Get previous tag
id: previous_tag
run: echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV
- name: Github Release Changelog Generator
uses: jaywcjlove/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
custom-emoji: "feat⭐,fix🐞,docs📖,chore💄,style🎨,type🆎,test⛑️,refactor🐝,website🌍,revert🔙,clean💊,perf📈,ci💢,build⛽"
template: |
## Bugs
{{fix}}
## Feature
{{feat}}
## Improve
{{refactor,perf,clean}}
## Misc
{{chore,style,ci||🔶 Nothing change}}
## Unknown
{{__unknown__}}
- name: Get the changelog
run: echo "${{ steps.changelog.outputs.changelog }}"
- name: Update release
id: update_release
uses: tubone24/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
body: |
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}