Skip to content

Commit

Permalink
2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayBox committed Dec 11, 2022
1 parent baa9812 commit ecd0e52
Show file tree
Hide file tree
Showing 17 changed files with 1,395 additions and 448 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
on:
release:
types: [created]

jobs:
release:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}

strategy:
fail-fast: false
matrix:
include:
- name: Linux-x86_64
target: x86_64-unknown-linux-gnu
runner: ubuntu-latest

- name: macOS-Apple
target: aarch64-apple-darwin
runner: macos-latest

- name: macOS-Intel
target: x86_64-apple-darwin
runner: macos-latest

- name: Windows
target: i686-pc-windows-msvc
runner: windows-latest

name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
steps:
- name: Fetch Repository
uses: actions/checkout@v3

- name: Update Rust Toolchain
run: rustup update stable

- name: Add Rust Target
run: rustup target add ${{ matrix.target }}

- name: Build Release (Windows)
if: ${{ matrix.runner == 'windows-latest' }}
run: cargo build --release --target ${{ matrix.target }}

- name: Bundle Release (Other)
if: ${{ matrix.runner != 'windows-latest' }}
run: |
cargo install --git https://github.com/burtonageo/cargo-bundle.git
cargo bundle --release --target ${{ matrix.target }}
- name: Create Zip Archive (Windows)
if: ${{ matrix.runner == 'windows-latest' }}
run: bash -c '7z a ${{ matrix.name }}.zip ./target/${{ matrix.target }}/release/*.exe'

- name: Create Zip Archive (macOS)
if: ${{ matrix.runner == 'macos-latest' }}
run: cd target/${{ matrix.target }}/release/bundle/osx && zip -r ../../../../../${{ matrix.name }}.zip *

- name: Create Zip Archive (Linux)
if: ${{ matrix.runner == 'ubuntu-latest' }}
run: zip -j ${{ matrix.name }}.zip target/${{ matrix.target }}/release/bundle/deb/*

- name: Upload Zip Archive
run: gh release upload ${{ github.ref_name }} ${{ matrix.name }}.zip --clobber
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
build/darwin/PolyMC-Curseforge.app/Contents/MacOS/PolyMC-Curseforge
build/linux/usr/bin/polymc-curseforge
build/windows/PolyMC-Curseforge.exe
output/
/target
Loading

0 comments on commit ecd0e52

Please sign in to comment.