Create Release #12
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: Create Release | |
on: | |
push: | |
tags: | |
- "v*" # Triggers on tags starting with 'v' | |
permissions: | |
contents: write | |
jobs: | |
# build-and-release-macos: | |
# runs-on: macos-latest | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v3 | |
# - name: Setup Rust | |
# uses: actions-rs/toolchain@v1 | |
# with: | |
# toolchain: stable | |
# override: true | |
# - name: Setup Certificate | |
# env: | |
# CODE_SIGN_CERTIFICATE: ${{ secrets.CODE_SIGN_CERTIFICATE }} | |
# CERT_PWD: ${{ secrets.CERT_PWD }} | |
# run: | | |
# echo "$CODE_SIGN_CERTIFICATE" | base64 --decode > certificate.p12 | |
# stat -f "%N %z" certificate.p12 | |
# security create-keychain -p "" build.keychain | |
# security default-keychain -d user -s build.keychain | |
# security unlock-keychain -p "" build.keychain | |
# security import certificate.p12 -k build.keychain -P "$CERT_PWD" -T /usr/bin/codesign | |
# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "" build.keychain | |
# - name: Build bundle | |
# run: make bundle-mac | |
# - name: Create GitHub Release | |
# id: create_release | |
# uses: softprops/action-gh-release@v1 | |
# with: | |
# files: | | |
# dist/MineSweeper.dmg | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-and-release-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Download linuxdeploy | |
run: | | |
wget -nv -c https://github.com/linuxdeploy/linuxdeploy/releases/download/2.0.0-alpha-1-20241106/linuxdeploy-x86_64.AppImage | |
chmod +x linuxdeploy-x86_64.AppImage | |
mkdir -p ~/.local/bin | |
mv linuxdeploy-x86_64.AppImage ~/.local/bin | |
sudo add-apt-repository universe | |
sudo apt install libfuse2t64 | |
- name: Build app image | |
run: | | |
export PATH=$HOME/.local/bin:$PATH | |
make linux-app-image | |
- name: Build debian package | |
run: | | |
cargo install cargo-deb | |
make linux-debian | |
- name: Build FlatPak | |
run: | | |
sudo apt install flatpak | |
sudo apt install flatpak-builder | |
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo --default-branch=stable --install builddir io.github.darrellroberts.minesweeper.yml | |
flatpak build-bundle repo minesweeper.flatpak io.github.darrellroberts.minesweeper | |
- name: Create GitHub Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
*.AppImage | |
target/debian/*.deb | |
*.flatpak | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |