name: Build-Release on: workflow_dispatch: inputs: 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: runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@v3 - run: cargo build --verbose - run: cargo test update_package_version -- {{ inputs.tag }} --nocapture - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }} tags: false - run: cargo publish --manifest-path csbindgen/Cargo.toml env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} build-dotnet: needs: [build-and-push-rust] runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@v3 - uses: Cysharp/Actions/.github/actions/setup-dotnet@main with: dotnet-version: 7.0.x # 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 # release create-release: needs: [build-and-push-rust, build-dotnet] uses: Cysharp/Actions/.github/workflows/create-release.yaml@main 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 }}