Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
ikpil committed Sep 23, 2023
1 parent 4f2cc63 commit c905abb
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
template: |
# What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION
categories:
- title: 'Changes'
labels:
- 'feature'
- 'feat'

- title: 'Bug Fixes'
labels:
- 'bug'
- 'fix'

version-resolver:
major:
labels:
- 'type: breaking'
minor:
labels:
- 'type: feature'
patch:
labels:
- 'type: bug'
- 'type: maintenance'
- 'type: docs'
- 'type: dependencies'
- 'type: security'

exclude-labels:
- 'skip-changelog'
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
runs-on: ubuntu-latest
env:
working-directory: ./dotnet-workflow

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'

- name: restore dependencies
working-directory: ${{ env.working-directory }}
run: dotnet restore

- name: build
working-directory: ${{ env.working-directory }}
run: dotnet build -c Release --no-restore

- name: publish
working-directory: ${{ env.working-directory }}
run: dotnet publish src/DotRecast.Recast.Demo -c Release --no-restore --no-self-contained --output working-temp

- name: version
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag}
major=${version%%.*}
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "major=${major}" >> $GITHUB_OUTPUT
- name: Zip
working-directory: ${{ env.working-directory }}
run: |
cd working-temp
echo "dotnet DotRecast.Recast.Demo.dll" > run.bat
zip -r ../DotRecast.Recast.Demo-${{ steps.version.outputs.version}}.zip ./
if: success()

- uses: release-drafter/release-drafter@master
with:
version: ${{ steps.version.outputs.version }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: zip Upload
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.working-directory }}/DotRecast.Recast.Demo-${{ steps.version.outputs.version}}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


0 comments on commit c905abb

Please sign in to comment.