Skip to content

Commit f1c4cf4

Browse files
authored
Merge pull request #29062 from ashley-cui/nightly-names
Upload artifacts with build suffix
2 parents d3687ab + f69796b commit f1c4cf4

2 files changed

Lines changed: 32 additions & 15 deletions

File tree

.github/workflows/release-build-artifacts.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ permissions:
4646
contents: read
4747

4848
jobs:
49-
build-artifacts:
50-
name: Build Artifacts
49+
get-version:
50+
name: Determine Version
5151
runs-on: ubuntu-latest
5252
if: github.repository == 'podman-container-tools/podman'
5353
outputs:
@@ -69,6 +69,18 @@ jobs:
6969
else
7070
echo "version_display=$VERSION-$sha" >> "$GITHUB_OUTPUT"
7171
fi
72+
73+
build-artifacts:
74+
name: Build Artifacts
75+
runs-on: ubuntu-latest
76+
if: github.repository == 'podman-container-tools/podman'
77+
needs: [get-version]
78+
steps:
79+
- name: Checkout Version
80+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
81+
with:
82+
ref: ${{ inputs.version }}
83+
persist-credentials: false
7284
- name: Set up Go
7385
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
7486
with:
@@ -83,13 +95,14 @@ jobs:
8395
- name: Upload to Actions as artifact
8496
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
8597
with:
86-
name: release-artifacts
98+
name: release-artifacts-${{ needs.get-version.outputs.version_display }}
8799
path: release/*
88100

89101
mac-pkg:
90102
name: Build MacOS pkginstaller
91103
runs-on: macos-latest
92104
if: github.repository == 'podman-container-tools/podman'
105+
needs: [get-version]
93106
env:
94107
APPLICATION_CERTIFICATE: ${{ secrets.MACOS_APPLICATION_CERT }}
95108
CODESIGN_IDENTITY: ${{ secrets.MACOS_APPLICATION_IDENTITY }}
@@ -133,7 +146,7 @@ jobs:
133146
- name: Artifact
134147
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
135148
with:
136-
name: mac-installers
149+
name: mac-installers-${{ needs.get-version.outputs.version_display }}
137150
path: |
138151
contrib/pkginstaller/out/podman-installer-macos-*.pkg
139152
@@ -143,17 +156,17 @@ jobs:
143156
matrix:
144157
arch: [amd64, arm64]
145158
runs-on: windows-latest
146-
needs: [build-artifacts]
159+
needs: [get-version, build-artifacts]
147160
steps:
148161
- name: Checkout Podman
149162
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
150163
with:
151164
ref: ${{ inputs.version }}
152165
persist-credentials: false
153-
- name: Determine version
154-
id: getversion
166+
- name: Normalize version for Windows
167+
id: normalized-windows-version
155168
env:
156-
VERSION: ${{ needs.build-artifacts.outputs.version_display }}
169+
VERSION: ${{ needs.get-version.outputs.version_display }}
157170
run: |
158171
$version = "${env:VERSION}"
159172
if ($version.Length -gt 0 -and $version[0] -eq "v") {
@@ -172,7 +185,7 @@ jobs:
172185
- name: Download Windows zip artifact
173186
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
174187
with:
175-
name: release-artifacts
188+
name: release-artifacts-${{ needs.get-version.outputs.version_display }}
176189
path: ${{ github.workspace }}\release-artifacts
177190
- name: Set up Go
178191
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
@@ -209,7 +222,7 @@ jobs:
209222
id: build
210223
env:
211224
PODMAN_ARCH: ${{ matrix.arch }}
212-
VERSION: ${{ steps.getversion.outputs.version }}
225+
VERSION: ${{ steps.normalized-windows-version.outputs.version }}
213226
run: |
214227
contrib\win-installer\build.ps1 `
215228
-Version "${env:VERSION}" `
@@ -224,14 +237,14 @@ jobs:
224237
- name: Rename the MSI
225238
env:
226239
PODMAN_ARCH: ${{ matrix.arch }}
227-
VERSION: ${{ steps.getversion.outputs.version }}
240+
VERSION: ${{ steps.normalized-windows-version.outputs.version }}
228241
run: |
229242
Push-Location contrib\win-installer
230243
Copy-Item -Path "podman-${env:VERSION}.msi" -Destination "podman-installer-windows-${env:PODMAN_ARCH}.msi"
231244
Pop-Location
232245
- name: Upload the MSI
233246
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
234247
with:
235-
name: win-msi-${{ matrix.arch }}
248+
name: win-msi-${{ matrix.arch }}-${{ needs.get-version.outputs.version_display }}
236249
path: |
237250
.\contrib\win-installer\podman-installer-windows-${{ matrix.arch }}.msi

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,14 @@ jobs:
123123
- name: Download all artifacts
124124
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
125125
- name: Show artifacts
126+
env:
127+
VERSION: ${{ needs.check.outputs.version }}
126128
run: |
127-
mv mac-installers/* release-artifacts
128-
mv win-msi-amd64/* release-artifacts
129-
mv win-msi-arm64/* release-artifacts
129+
mkdir -p release-artifacts
130+
mv "mac-installers-$VERSION"/* release-artifacts/
131+
mv "win-msi-amd64-$VERSION"/* release-artifacts/
132+
mv "win-msi-arm64-$VERSION"/* release-artifacts/
133+
mv "release-artifacts-$VERSION"/* release-artifacts/
130134
pushd release-artifacts
131135
sha256sum * > shasums
132136
popd

0 commit comments

Comments
 (0)