Skip to content

re-add manual zip step to release job #26

re-add manual zip step to release job

re-add manual zip step to release job #26

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
tags:
- 'v*.*.*'
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Build Release
run: cargo build --release
- name: Create Artifact Directory
run: mkdir artifact
- name: Copy Executable
run: cp target/release/shawzin.exe artifact/
- name: Copy Sounds Folder
run: cp -r sounds/ artifact/sounds/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: shawzin
path: artifact/
release:
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: shawzin
- name: Zip Files
run: |
zip -r shawzin.zip shawzin.exe sounds
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: shawzin.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}