Repository navigation
79 lines (79 loc) · 2.59 KB
/
Copy pathrelease.yml
File metadata and controls
79 lines (79 loc) · 2.59 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Release
on:
push:
tags: ['**', '!test/**']
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pathman-public-builds
cancel-in-progress: false
jobs:
metadata:
runs-on: windows-2025
permissions:
contents: write
outputs:
version: ${{ steps.tag.outputs.version }}
version_number: ${{ steps.tag.outputs.version_number }}
release_type: ${{ steps.tag.outputs.release_type }}
source_ref: ${{ steps.tag.outputs.source_ref }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0
- name: Reserve public build identity
id: tag
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
PATHMAN_VARIABLES_TOKEN: ${{ secrets.PATHMAN_VARIABLES_TOKEN }}
run: |
if ($env:GITHUB_EVENT_NAME -eq 'workflow_dispatch') {
./scripts/public-build.ps1 -Kind Test
} else {
./scripts/public-build.ps1 -Kind Release -Tag $env:GITHUB_REF_NAME
}
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: release-metadata
path: artifacts/release/
if-no-files-found: error
retention-days: 14
build:
needs: metadata
uses: ./.github/workflows/build.yml
with:
version: ${{ needs.metadata.outputs.version }}
version_number: ${{ needs.metadata.outputs.version_number }}
release_type: ${{ needs.metadata.outputs.release_type }}
source_ref: ${{ needs.metadata.outputs.source_ref }}
publish:
needs: [metadata, build]
runs-on: windows-2025
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0
ref: ${{ needs.metadata.outputs.source_ref }}
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: release-metadata
path: artifacts/release
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
pattern: PathMan-*
path: artifacts/release-packages
merge-multiple: true
- name: Publish verified installers
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
PATHMAN_VARIABLES_TOKEN: ${{ secrets.PATHMAN_VARIABLES_TOKEN }}
run: |
./scripts/public-build.ps1 -Operation Check
./scripts/publish-release.ps1