mirror of
https://github.com/Sarsoo/csbindgen.git
synced 2024-12-23 06:56:27 +00:00
release
This commit is contained in:
parent
e4b25c3d73
commit
71805d0668
40
.github/workflows/build-release.yml
vendored
40
.github/workflows/build-release.yml
vendored
@ -6,15 +6,9 @@ on:
|
||||
tag:
|
||||
description: "tag: git tag you want create. (sample 1.0.0)"
|
||||
required: true
|
||||
dry-run:
|
||||
description: "dry-run: false = create release/nuget. true = never create release/nuget."
|
||||
required: true
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
env:
|
||||
GIT_TAG: ${{ github.event.inputs.tag }}
|
||||
DRY_RUN: ${{ github.event.inputs.dry-run }}
|
||||
|
||||
jobs:
|
||||
build-and-push-rust:
|
||||
@ -46,26 +40,20 @@ jobs:
|
||||
# pack nuget
|
||||
- run: dotnet build -c Release -p:Version=${{ inputs.tag }}
|
||||
- run: dotnet pack -c Release --no-build -p:Version=${{ inputs.tag }} -o ./publish
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nuget
|
||||
path: ./publish
|
||||
- run: dotnet nuget push "./publish/*.nupkg" -s https://www.nuget.org/api/v2/package -k ${{ secrets.NUGET_KEY }}
|
||||
|
||||
# release
|
||||
create-release:
|
||||
needs: [build-and-push-rust, build-dotnet]
|
||||
uses: Cysharp/Actions/.github/workflows/create-release.yaml@main
|
||||
needs: [build-dotnet, build-and-push-rust]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
# Create Releases
|
||||
- uses: actions/create-release@v1
|
||||
id: create_release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
dry-run: ${{ inputs.dry-run }}
|
||||
commit-id: ${{ needs.update-packagejson.outputs.sha }}
|
||||
tag: ${{ inputs.tag }}
|
||||
push-tag: true
|
||||
nuget-push: true
|
||||
secrets: inherit
|
||||
|
||||
cleanup:
|
||||
if: needs.update-packagejson.outputs.is-branch-created == 'true'
|
||||
needs: [update-packagejson, create-release]
|
||||
uses: Cysharp/Actions/.github/workflows/clean-packagejson-branch.yaml@main
|
||||
with:
|
||||
branch: ${{ needs.update-packagejson.outputs.branch-name }}
|
||||
tag_name: ${{ env.GIT_TAG }}
|
||||
release_name: Ver.${{ env.GIT_TAG }}
|
||||
draft: true
|
||||
prerelease: false
|
Loading…
Reference in New Issue
Block a user