-
Notifications
You must be signed in to change notification settings - Fork 17
72 lines (67 loc) · 2.1 KB
/
release-please.yml
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
name: build release package
on:
merge_group:
branches:
- main
workflow_dispatch:
env:
IMAGE_NAME: ublue-update
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
jobs:
release-please:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release-please.outputs.releases_created }}
tag: ${{ steps.release-please.outputs.tag_name }}
upload_url: ${{ steps.release-please.outputs.upload_url }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release-please
with:
release-type: simple
package-name: release-please-action
build-release:
name: Build and push rpm package
runs-on: ubuntu-22.04
permissions:
contents: write
packages: write
id-token: write
needs: release-please
if: needs.release-please.outputs.releases_created
steps:
# Checkout push-to-registry action GitHub repository
- name: Checkout Push to Registry action
uses: actions/checkout@v4
# Build image using Buildah action
- name: Build package using containerized build environment
id: build_image
uses: redhat-actions/buildah-build@v2
with:
containerfiles: |
./Containerfile.builder
image: ${{ env.IMAGE_NAME }}
tags: |
${{ needs.release-please.outputs.tag }}
oci: true
extra-args: |
-v ${{ github.workspace }}:/app
--target rpm
- name: upload output artifacts as release artifact
uses: actions/upload-artifact@v3
with:
name: ublue-updater-rpms
path: output/
- name: upload rpm packages
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
find output/ -type f -name '*.rpm' -print0 | \
xargs -0 -tI{} gh release upload \
${{ needs.release-please.outputs.tag }} \
{} \
--repo ${{ github.repository_owner }}/${{ github.event.repository.name }} \
--clobber