-
Notifications
You must be signed in to change notification settings - Fork 22
114 lines (114 loc) · 3.79 KB
/
package.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: package
on: [push, pull_request]
jobs:
get-sources:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download tools and sources
run: ./actions/download.sh
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: sources
retention-days: 1
path: |
actions/*
include/*
config/*
*.tar.gz
build-and-package:
needs: get-sources
strategy:
fail-fast: false
matrix:
image: [
"alpine:3.17", "alpine:3.18", "alpine:3.19", "alpine:3.20",
"registry.access.redhat.com/ubi8-minimal",
"registry.access.redhat.com/ubi9-minimal",
"debian:10-slim", "debian:11-slim", "debian:12-slim",
"fedora:39", "fedora:40",
"opensuse/leap:15.5", "opensuse/leap:15.6", "opensuse/tumbleweed",
"ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "ubuntu:24.10",
]
experimental: [false]
include:
- image: alpine:edge
experimental: true
#- image: fedora:rawhide
#experimental: true
- image: debian:testing-slim
experimental: true
- image: ubuntu:devel
experimental: true
continue-on-error: ${{ matrix.experimental }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
options: --security-opt seccomp=unconfined
env:
IMAGE: ${{ matrix.image }}
CLOUDSMITH_REPOSITORY: nxadm-pkgs/rakudo-pkg
steps:
- name: Retrieve sources
uses: actions/download-artifact@v4
with:
name: sources
- name: Create build environment
run: |
chmod +x actions/*
. actions/buildenv.sh
- name: Build
run: ./actions/build.sh
- name: Package
run: |
./actions/package.sh
ls -lh $GITHUB_WORKSPACE/packages
- name: Archive packages
uses: actions/upload-artifact@v4
with:
name: packages-${{ strategy.job-index }}
retention-days: 1
path: ${{ github.workspace }}/packages/
release-to-github:
# Forks don't need to release packages, just have the artifacts available
if: github.repository_owner == 'nxadm' && startsWith(github.ref, 'refs/tags/v')
needs: build-and-package
runs-on: ubuntu-latest
steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
path: packages
pattern: packages-*
merge-multiple: true
- run: ls -R packages
- name: Upload to Github Releases
uses: ncipollo/release-action@v1
with:
artifacts: "packages/*.sha512,packages/*.apk,packages/*.deb,packages/*.rpm,packages/*.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
body: "For apk/deb/rpm packages, you can use the rakudo-pkg [OS repositories](https://github.com/nxadm/rakudo-pkg#os-repositories)."
# release-to-repos:
# needs: release-to-github
# runs-on: ubuntu-latest
# env:
# CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
# steps:
# - name: Retrieve sources
# uses: actions/download-artifact@v4
# with:
# name: sources
# - name: Download packages
# uses: actions/download-artifact@v4
# with:
# name: packages-*
# path: packages
# - name: Upload to repository
# run: |
# chmod +x actions/*
# actions/upload.sh packages