-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from stop-pattern/feature/tag
tag/releaseを自動生成
- Loading branch information
Showing
9 changed files
with
135 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name-template: 'v$RESOLVED_VERSION 🌈' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
label: 'chore' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
patch: | ||
labels: | ||
- 'patch' | ||
default: patch | ||
template: | | ||
## Changes | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
name: MSBuild | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
#- main | ||
- main | ||
- develop | ||
paths: | ||
- '*/**' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Create release | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- closed | ||
|
||
jobs: | ||
build: | ||
name: Generate dll | ||
runs-on: windows-latest | ||
outputs: | ||
name: ${{ steps.version.outputs.name }} | ||
version: ${{ steps.version.outputs.version }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup MSBuild.exe | ||
uses: microsoft/setup-msbuild@v1.3.1 | ||
- name: Setup Nuget | ||
uses: NuGet/setup-nuget@v1.2.0 | ||
- name: Restore nuget packages | ||
run: nuget restore AtsExCsTemplate.sln | ||
- name: Build sln | ||
run: msbuild AtsExCsTemplate.sln /m /p:configuration="Release" /p:platform="Any CPU" /p:OutputPath="./out/" | ||
shell: cmd | ||
- name: Collect artifact | ||
run: | | ||
mkdir plugins/ | ||
find . -type f -path '*/out/*.dll' | xargs mv -t ./plugins/ | ||
shell: bash | ||
- name: Check assembly version | ||
id: version | ||
run: | | ||
Get-ChildItem plugins/ -Recurse -Filter "*.dll" -File | foreach { | ||
Write-Output $_.FileName | ||
$_.FileName | ||
"name=$_" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | ||
$ver=(Get-Item $_.FullName).VersionInfo.FileVersion | ||
$ver | ||
"version=v$ver" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | ||
} | ||
shell: pwsh | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: plugins | ||
path: ./plugins/ | ||
|
||
release: | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
needs: build | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Create tag | ||
run: | | ||
git tag ${{needs.build.outputs.version}} | ||
git push origin ${{needs.build.outputs.version}} | ||
- name: Create release draft | ||
id: create-draft | ||
uses: release-drafter/release-drafter@v5.12.1 | ||
with: | ||
version: ${{needs.build.outputs.version}} | ||
name: ${{needs.build.outputs.version}} | ||
tag: ${{needs.build.outputs.version}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Download a build artifact | ||
uses: actions/download-artifact@v3.0.2 | ||
- name: Get repository name | ||
run: | | ||
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}" >> $GITHUB_ENV | ||
echo "FILE_NAME=${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}_${{needs.build.outputs.version}}" >> $GITHUB_ENV | ||
- name: Compress DLLs | ||
run: | | ||
cd plugins/ | ||
zip ${{env.FILE_NAME}}.zip -r * | ||
- name: Upload release asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{steps.create-draft.outputs.upload_url}} | ||
asset_path: ./plugins/${{env.FILE_NAME}}.zip | ||
asset_name: ${{env.FILE_NAME}}.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters