mirror of
https://github.com/rfvgyhn/min-ed-launcher.git
synced 2026-02-04 18:35:38 +00:00
90 lines
2.0 KiB
YAML
90 lines
2.0 KiB
YAML
name: Publish
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
BUILD_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish
|
|
strategy:
|
|
matrix:
|
|
kind: ['linux', 'windows']
|
|
include:
|
|
- kind: linux
|
|
os: ubuntu-latest
|
|
target: linux-x64
|
|
- kind: windows
|
|
os: windows-latest
|
|
target: win10-x64
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup dotnet
|
|
uses: actions/setup-dotnet@v3
|
|
|
|
- name: Install Rust
|
|
if: ${{ matrix.target == 'win10-x64' }}
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: stable
|
|
components: clippy, rustfmt
|
|
|
|
- name: Publish Windows
|
|
if: ${{ matrix.target == 'win10-x64' }}
|
|
run: .\publish.ps1
|
|
|
|
- name: Publish Linux
|
|
if: ${{ matrix.target == 'linux-x64' }}
|
|
run: ./publish.sh
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: artifacts
|
|
path: artifacts/*
|
|
retention-days: 1
|
|
|
|
release:
|
|
name: Release
|
|
needs: Publish
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: artifacts
|
|
path: ./
|
|
if-no-files-found: error
|
|
|
|
- name: Show files
|
|
run: ls -R
|
|
working-directory: artifacts
|
|
|
|
- name: Create Checksums
|
|
run: ci/checksums.sh
|
|
|
|
- name: Create Release Notes
|
|
run: ci/release-notes.sh
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
draft: true
|
|
body_path: release-notes.md
|
|
files: |
|
|
artifacts/min-ed-launcher*
|
|
artifacts/shasum.txt
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|