Skip to content

Commit

Permalink
Merge pull request #4 from xunmengshe/action
Browse files Browse the repository at this point in the history
Action
  • Loading branch information
oxygen-dioxide authored Aug 6, 2023
2 parents c499cc5 + 3fc7b1b commit de4ff32
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
workflow_dispatch:
inputs:
version:
description: 'Version Number'
default: '0.0.0.0'
required: true
type: string
project:
description: 'the project to be compiled'
required: true
type: string

jobs:
release:
runs-on: ${{ matrix.os.runs-on }}

strategy:
matrix:
os:
- runs-on: windows-latest
arch: win-x64

steps:
- uses: actions/checkout@v1

- name: Patch Versions
uses: justalemon/VersionPatcher@master
with:
version: ${{ inputs.version }}
csproj-files: "${{ inputs.project }}/*.csproj"

- name: restore x64
run: dotnet restore ${{ inputs.project }} -r ${{ matrix.os.arch }}

- name: build x64
run: dotnet publish ${{ inputs.project }} -c Release -r ${{ matrix.os.arch }} --self-contained true -o bin/${{ matrix.os.arch }}

- name: compress x64
run: 7z a ${{ inputs.project }}-${{ matrix.os.arch }}-${{ inputs.version }}.zip ./bin/${{ matrix.os.arch }}/*

- name: Upload artifact
uses: actions/[email protected]
with:
name: ${{ inputs.project }}-${{ matrix.os.arch }}-${{ inputs.version }}.zip
path: ${{ inputs.project }}-${{ matrix.os.arch }}-${{ inputs.version }}.zip

0 comments on commit de4ff32

Please sign in to comment.