use newer artifact versions #436
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: package | |
on: [push, pull_request] | |
jobs: | |
get-sources: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
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-20.04 | |
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 | |
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-20.04 | |
steps: | |
- name: Download packages | |
uses: actions/[email protected] | |
with: | |
name: packages | |
path: 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-20.04 | |
env: | |
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} | |
steps: | |
- name: Retrieve sources | |
uses: actions/[email protected] | |
with: | |
name: sources | |
- name: Download packages | |
uses: actions/[email protected] | |
with: | |
name: packages | |
path: packages | |
- name: Upload to repository | |
run: | | |
chmod +x actions/* | |
actions/upload.sh packages |