Skip to content

add README.txt and Quickstart.txt #21

add README.txt and Quickstart.txt

add README.txt and Quickstart.txt #21

name: "Overstrike Release"
permissions:
contents: write
packages: read
on:
push:
tags:
- "OS/v*"
env:
CSPROJ: Overstrike/Overstrike.csproj
PUBLISH_DIR: Overstrike/bin/Release/net7.0-windows/publish/win-x64/
jobs:
publish:
runs-on: windows-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Publish the project
run: dotnet publish ${{ env.CSPROJ }} -p:PublishProfile=FolderProfile
- name: Add LICENSE.txt
run: cp LICENSE.txt ${{ env.PUBLISH_DIR }}
- name: Add README.txt
run: cp Overstrike/README.txt ${{ env.PUBLISH_DIR }}
- name: Add Quickstart.txt
run: cp Overstrike/Quickstart.txt ${{ env.PUBLISH_DIR }}
- name: Generate names by tag
id: names
shell: bash
run: |
{
ref="${{ github.ref }}"
ref=${ref//refs\/tags\//}
release_name=${ref/OS\/v/Overstrike (v. }
echo "release_name=${release_name})" >> $GITHUB_OUTPUT
archive_name=${ref/OS\/v/Overstrike_v}
archive_name=${archive_name// /_}
echo "archive_name=${archive_name}.zip" >> $GITHUB_OUTPUT
}
- name: Zip the files
uses: thedoctor0/[email protected]
with:
type: "zip"
filename: ${{ steps.names.outputs.archive_name }}
directory: ${{ env.PUBLISH_DIR }}
exclusions: "*.pdb"
- name: Create release
uses: ncipollo/release-action@v1
with:
name: ${{ steps.names.outputs.release_name }}
body: ""
artifacts: "${{ env.PUBLISH_DIR }}${{ steps.names.outputs.archive_name }}"