AtsEXを1.0.0-RC8に更新 #58
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
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 .NET | |
uses: actions/setup-dotnet@v4.0.0 | |
- name: Restore nuget packages | |
run: dotnet restore AtsExCsTemplate.sln --locked-mode | |
- name: Build sln | |
run: dotnet publish .\AtsExCsTemplate.sln --configuration Release --no-restore /p:platform="Any CPU" /p:OutputPath="./out/" | |
- name: Collect artifact | |
run: | | |
mkdir plugins/ | |
find . -type f -path '*/out/publish/*.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: 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: Create Release Draft and Upload Release Asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{needs.build.outputs.version}} | |
name: Release ${{needs.build.outputs.version}} | |
body: TODO New Release. | |
draft: true | |
prerelease: false | |
files: | | |
./plugins/${{env.FILE_NAME}}.zip | |
LICENSE |