-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (58 loc) · 1.96 KB
/
promote.yaml
File metadata and controls
62 lines (58 loc) · 1.96 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
name: Promote
run-name: "Promote ${{ github.ref_name }}"
on:
push:
tags:
- "*"
jobs:
build:
uses: ./.github/workflows/build.yaml
secrets: inherit
promote-artifacts:
needs: build
runs-on: ubuntu-24.04
outputs:
artifact-link: ${{ steps.promote.outputs.link }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Promote artifacts
id: promote
uses: scality/action-artifacts@v4
with:
method: promote
url: https://artifacts.scality.net
name: ${{ needs.build.outputs.artifact-name }}
tag: ${{ github.ref_name }}
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
create-release:
needs: promote-artifacts
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
with:
# NOTE: We explicitly set the refs otherwise the tag
# annotations content is not fetched
# See: https://github.com/actions/checkout/issues/882
ref: ${{ github.ref }}
- name: Retrieve ISO from artifacts
run: >
curl --fail -L --remote-name-all -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }}
${{ needs.promote-artifacts.outputs.artifact-link }}/example-solution-${{ github.ref_name }}.iso
${{ needs.promote-artifacts.outputs.artifact-link }}/SHA256SUM
- uses: softprops/action-gh-release@v2
with:
name: MetalK8s Example Solution ${{ github.ref_name }}
files: |
example-solution-${{ github.ref_name }}.iso
SHA256SUM
tag_name: ${{ github.ref_name }}
generate_release_notes: true
# We consider pre-releases if the tag contains a hyphen
# e.g. v1.2.3-alpha.0
prerelease: ${{ contains(github.ref_name, '-') }}
draft: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}