Skip to content

Draft Release

Draft Release #23

Workflow file for this run

# good ref:https://github.com/ruby/ruby-dev-builder/blob/b0bf59a17c17985d4692243d4689c273f6348fa5/.github/workflows/build.yml#L40
name: Draft Release
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:
inputs:
tag:
description: 'Release Tag'
required: true
type: string
default: ${{ github.ref_name }} # github.ref_name

Check failure on line 15 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Draft Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 15, Col: 18): Unrecognized named-value: 'github'. Located at position 1 within expression: github.ref_name
env:
GH_TOKEN: ${{ github.token }}
jobs:
setup-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
run: gh release create ${{ github.ref_name }} --draft --generate-notes
publish:
runs-on: ${{ matrix.os }}
needs: setup-release
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Publish
run: dotnet publish Resumer/ --output ./publish
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: publish
path: ./publish/
- name: Zip Files
shell: pwsh
run: |
if ($env:RUNNER_OS -eq "Windows") {
mv ./publish/Resumer.exe ./publish/resumer.exe
7z a ./${{ matrix.os }}_resumer_${{ github.ref_name }}.zip '.\publish\*'
}
else {
mv ./publish/Resumer ./publish/resumer
cd ./publish
zip -1g ../${{ matrix.os }}_resumer_${{ github.ref_name }}.zip *
cd ..
}
- name: Upload Release Asset
run: gh release upload ${{ github.ref_name }} ${{ matrix.os }}_resumer_${{ github.ref_name }}.zip