-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from cyb3rpsych0s1s/chore/fixes-and-improvements
Chore/fixes and improvements
- Loading branch information
Showing
138 changed files
with
6,084 additions
and
6,391 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
tag: | ||
description: "Git tag" | ||
required: true | ||
type: string | ||
release: | ||
description: "Cargo build profile" | ||
type: boolean | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
BIN-FOLDER: bundle${{ inputs.release && '' || '-dev-only' }} | ||
BIN-NAME: Audioware-windows-latest-${{ inputs.tag }}${{ inputs.release && '' || '-DEV_ONLY' }} | ||
CHECKSUM-NAME: checksum${{ inputs.release && '' || '-DEV_ONLY' }} | ||
BUILD-PROFILE: ${{ inputs.release && 'release' || 'debug' }} | ||
BUILD-FEATURES: ${{ inputs.release && '' || 'hot-reload' }} | ||
ARTIFACT-NAME: windows-latest-${{ inputs.tag }}${{ inputs.release && '' || '-dev-only' }}-artifact | ||
|
||
jobs: | ||
bundle: | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Prepare Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: x86_64-pc-windows-msvc | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: release | ||
- name: Additional tools | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: just | ||
- name: Bundle mod files | ||
run: just ci ${{ env.BIN-FOLDER }}\${{ env.BIN-NAME }} ${{ env.BUILD-PROFILE }} ${{ env.BUILD-FEATURES }} | ||
- name: Zip files | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: zip | ||
filename: ${{ env.BIN-NAME }}.zip | ||
directory: ${{ env.BIN-FOLDER }} | ||
path: . | ||
- name: Generate zip checksum | ||
run: Get-FileHash -Path "${{ env.BIN-FOLDER }}\${{ env.BIN-NAME }}.zip" -Algorithm SHA256 | Select-Object -ExpandProperty Hash > "${{ env.CHECKSUM-NAME }}.txt" | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.ARTIFACT-NAME }} | ||
path: ${{ env.BIN-FOLDER }}/${{ env.BIN-NAME }}.zip | ||
if-no-files-found: error | ||
- name: Upload artifact checksum | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.ARTIFACT-NAME }}-checksum | ||
path: ${{ env.CHECKSUM-NAME }}.txt | ||
if-no-files-found: error |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,49 +14,20 @@ env: | |
IS_DRAFT: ${{ startsWith(github.ref_name, 'beta') || startsWith(github.ref_name, 'alpha') }} | ||
IS_PRERELEASE: ${{ startsWith(github.ref_name, 'rc') }} | ||
IS_RELEASE: ${{ startsWith(github.ref_name, 'v') }} | ||
BIN-NAME: Audioware-windows-latest-${{ github.ref_name }} | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
||
jobs: | ||
bundle: | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Prepare Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: x86_64-pc-windows-msvc | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: release | ||
- name: Additional tools | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: just | ||
- name: Bundle mod files | ||
run: just ci 'Audioware-windows-latest-${{ github.ref_name }}' '${{ env.IS_RELEASE }}' | ||
- name: Zip files | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: zip | ||
filename: Audioware-windows-latest-${{ github.ref_name }}.zip | ||
directory: Audioware-windows-latest-${{ github.ref_name }} | ||
path: . | ||
- name: Generate zip checksum | ||
run: Get-FileHash -Path "Audioware-windows-latest-${{ github.ref_name }}\Audioware-windows-latest-${{ github.ref_name }}.zip" -Algorithm SHA256 | Select-Object -ExpandProperty Hash > "checksum.txt" | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: windows-latest-${{ github.ref_name }}-artifact | ||
path: Audioware-windows-latest-${{ github.ref_name }}/Audioware-windows-latest-${{ github.ref_name }}.zip | ||
if-no-files-found: error | ||
- name: Upload artifact checksum | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: windows-latest-${{ github.ref_name }}-artifact-checksum | ||
path: checksum.txt | ||
if-no-files-found: error | ||
uses: ./.github/workflows/bundle.yml | ||
with: | ||
tag: ${{ github.ref_name }} | ||
release: true | ||
bundle-dev-only: | ||
uses: ./.github/workflows/bundle.yml | ||
with: | ||
tag: ${{ github.ref_name }} | ||
release: false | ||
release: | ||
if: ${{ startsWith(github.event.ref, 'refs/tags') }} | ||
runs-on: windows-2019 | ||
|
@@ -70,7 +41,7 @@ jobs: | |
- name: Create release ${{ github.ref_name }} | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "release/Audioware-windows-latest-${{ github.ref_name }}.zip,release/checksum.txt" | ||
artifacts: "release/${{ env.BIN-NAME }}.zip,release/${{ env.BIN-NAME }}-DEV_ONLY.zip,release/checksum.txt,release/checksum-DEV_ONLY.txt" | ||
draft: ${{ env.IS_DRAFT }} | ||
prerelease: ${{ env.IS_PRERELEASE }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
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
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
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
Oops, something went wrong.