Release Server Package #12
Workflow file for this run
This file contains hidden or 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: Release Server Package | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| package_path: | |
| description: 'The package to publish' | |
| type: choice | |
| required: true | |
| options: | |
| # pkgs/sdk/client is omitted here since this workflow is for ubuntu and the client sdk build process requires macos | |
| - pkgs/dotnet-server-sdk-consul | |
| - pkgs/dotnet-server-sdk-dynamodb | |
| - pkgs/dotnet-server-sdk-redis | |
| - pkgs/sdk/server | |
| - pkgs/sdk/server-ai | |
| - pkgs/telemetry | |
| - pkgs/shared/common | |
| - pkgs/shared/common-json-net | |
| dry_run: | |
| description: 'Is this a dry run. If so no package will be published.' | |
| type: boolean | |
| required: true | |
| generate_provenance: | |
| description: 'Whether to generate provenance for this publish. Note: Workflow must be run from a tag (not a branch) for provenance generation to succeed.' | |
| type: boolean | |
| required: true | |
| default: true | |
| workflow_call: | |
| inputs: | |
| package_path: | |
| description: 'Path to the package directory (e.g. pkgs/dotnet-server-sdk-redis)' | |
| type: string | |
| required: true | |
| dry_run: | |
| description: 'Is this a dry run. If so no package will be published.' | |
| type: boolean | |
| required: true | |
| generate_provenance: | |
| description: 'Whether to generate provenance for this publish.' | |
| type: boolean | |
| default: true | |
| tag_name: | |
| description: 'The tag name to use for the provenance file' | |
| type: string | |
| required: true | |
| jobs: | |
| release: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| outputs: | |
| hashes: ${{ steps.full-release.outputs.hashes }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Env from project's Env file | |
| shell: bash | |
| run: echo "$(cat ${{ inputs.package_path }}/github_actions.env)" >> $GITHUB_ENV | |
| - uses: ./.github/actions/full-release | |
| id: full-release | |
| with: | |
| assembly_key_path_pair: ${{ env.ASSEMBLY_KEY_PATH_PAIR }} | |
| workspace_path: ${{ env.WORKSPACE_PATH }} | |
| project_file: ${{ env.PROJECT_FILE }} | |
| build_output_path: ${{ env.BUILD_OUTPUT_PATH }} | |
| test_project_file: ${{ env.TEST_PROJECT_FILE }} | |
| dll_name: ${{ env.BUILD_OUTPUT_DLL_NAME }} | |
| dry_run: ${{ inputs.dry_run }} | |
| aws_role: ${{ vars.AWS_ROLE_ARN }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| run_consul: ${{ inputs.package_path == 'pkgs/dotnet-server-sdk-consul' }} | |
| run_dynamodb: ${{ inputs.package_path == 'pkgs/dotnet-server-sdk-dynamodb' }} | |
| run_redis: ${{ inputs.package_path == 'pkgs/dotnet-server-sdk-redis' }} | |
| release-provenance: | |
| needs: ['release'] | |
| permissions: | |
| actions: read | |
| id-token: write | |
| contents: write | |
| uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0 | |
| if: inputs.generate_provenance | |
| with: | |
| base64-subjects: "${{ needs.release.outputs.hashes }}" | |
| upload-assets: true | |
| upload-tag-name: ${{ inputs.tag_name }} | |
| provenance-name: ${{ format('{0}_provenance.intoto.jsonl', inputs.tag_name) }} |