Skip to content

Forgot to checkout before runnining local actions #2

Forgot to checkout before runnining local actions

Forgot to checkout before runnining local actions #2

Workflow file for this run

name: Binary release
# Manual release with input version number
on:
workflow_dispatch:
inputs:
version:
description: Enter the release version (e.g., 0.1.0)
required: true
push:
branches:
- binary-release
jobs:
# This job builds the binaries for each release
build-binary:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
artifact_name: linux-artifact
artifact_filename: stump_server
- os: windows-latest
artifact_name: windows-artifact
artifact_filename: stump_server.exe
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build web application
uses: ./.github/actions/build-web
- name: Build stump server
uses: ./.github/actions/build-server
- name: Upload server artifact
uses: ./.github/actions/upload-artifact
with:
upload-name: ${{ matrix.artifact_name }}
upload-path: target/release/${{ matrix.artifact_filename }}
# This job creates the release and organizes associated files
create-release:
needs: build-binary
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download artifact (Linux)
uses: actions/download-artifact@v4
with:
name: linux-artifact
path: StumpServer-linux
- name: Download artifact (Windows)
uses: actions/download-artifact@v4
with:
name: windows-artifact
path: StumpServer-windows
- name: Install dependencies
run: sudo apt-get install -y gh zip
- name: Zip artifacts
run: |
cd StumpServer-linux
zip -r ../linux-build-results.zip *
cd ../StumpServer-windows
zip -r ../windows-build-results.zip *
cd ..
- name: Create release and upload artifacts
run: |
gh auth login --with-token ${{ github.token }}
gh release create v${{ github.event.inputs.version || '0.0.test' }} \
--draft \
--target binary-release \
--title 'Release ${{ github.event.inputs.version || '0.0.test' }}' \
--generate-notes \
linux-build-results.zip#StumpServer-${{ github.event.inputs.version || '0.0.test' }}-x64-Linux.zip \
windows-build-results.zip#StumpServer-${{ github.event.inputs.version || '0.0.test' }}-x64-Windows.zip