Repository navigation
41 lines (37 loc) · 1.74 KB
/
Copy pathrelease.yml
File metadata and controls
41 lines (37 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Release
on:
push:
branches: [main]
permissions:
contents: write
# Neither a reusable workflow nor a composite action can grant a scope, so the caller owns these:
# `packages: write` for the GitHub Packages mirror, `id-token: write` for the nuget.org Trusted
# Publishing exchange, which GitHub withholds by default.
packages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
name: Release packages
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
# A composite action, not a reusable workflow: nuget.org validates the OIDC `job_workflow_ref`
# claim against the registered Trusted Publishing policy, and inside a called workflow that
# claim names the called repository. Running it here keeps the claim on this file, which is the
# file name the policy is registered against.
- uses: purview-dev/build/actions/purview-release@main
with:
release-mode: NuGet
trusted-publishing: true
# The nuget.org profile name, not the sign-in email.
nuget-user: kieronlanning
# A composite action has no `secrets` context, so the read token is passed explicitly.
packages-read-token: ${{ secrets.PURVIEW_PACKAGES_READ_TOKEN }}
# A composite action has no `vars` context, so repository variables are passed here.
source-mapping: ${{ vars.PURVIEW_NUGET_SOURCE_MAPPING }}
github-packages: ${{ vars.PURVIEW_PUBLISH_GITHUB_PACKAGES == 'true' }}
github-packages-keep-versions: ${{ vars.PURVIEW_GITHUB_PACKAGES_KEEP_VERSIONS || '1' }}
github-packages-retention-hours: ${{ vars.PURVIEW_GITHUB_PACKAGES_RETENTION_HOURS || '24' }}