Skip to content

Build Rakudo Star Releases (Windows MSI and Linux RSTAR source) #35

Build Rakudo Star Releases (Windows MSI and Linux RSTAR source)

Build Rakudo Star Releases (Windows MSI and Linux RSTAR source) #35

# This workflow enforces always the "Rakudo latest" release as the basis for the to-build Star release
# As we always work with TAGs, the two build tools could get the TAG as a parameter and then build this release instead of always building "Rakudo latest"
# Will enhance the workflow later to getr a TAG as an input
name: Build Rakudo Star Releases (Windows MSI and Linux RSTAR source)
# Create triggers the workflow on new tag's or branches
on:
create: #[push, create, workflow_dispatch]
tags:
- 2[0-9]+.[0-1][0-1]'**'
# workflow_dispatch: # IF you want to enable a GH dispatch (manual build) you MUST set a TAG in "ncipollo/release-action" below!!!
env:
GPG_FINGERPRINT: 3E7E3C6EAF916676AC549285A2919382E961E2EE
jobs:
build_Rakudo-Star_Windows_MSI_package:
# Windows-latest doesn't work since it's 2022. We need to fall back to windows-2019
runs-on: windows-2019
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v4
- name: Import gpg key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
fingerprint: ${{ env.GPG_FINGERPRINT }}
- name: Run the build-with-choco.ps1 script
run: pwsh -command ".\$GITHUB_WORKSPACE\tools\build\binary-release\Windows\build-with-choco.ps1" -sign
- name: List my stuff
run: Get-ChildItem -Exclude ".git" -Recurse
- name: Upload Rakudo-Star Windows artifacts
uses: actions/upload-artifact@v3
with:
name: output
path: tools/build/binary-release/Windows/*
if-no-files-found: error
build_Rakudo-Star_Linux_source:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt update
sudo apt install -y cpanminus curl gcc make
cpanm -v ExtUtils::Command Pod::Usage
- name: Collect RSTAR System Informations
env:
RSTAR_DEBUG: "1"
run: ./bin/rstar sysinfo
- name: Fetch RSTAR Components
run: ./bin/rstar fetch -l
- name: Import gpg key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
fingerprint: ${{ env.GPG_FINGERPRINT }}
- name: Create RSTAR Distribution
run: ./bin/rstar dist
- name: List my stuff
run: ls -lAR -I ".git" -I "src"
- name: Upload Rakudo-Star Linux artifacts
uses: actions/upload-artifact@v3
with:
name: output
path: dist/*
if-no-files-found: error
release_Rakudo-Star_artifacts:
needs: [build_Rakudo-Star_Windows_MSI_package, build_Rakudo-Star_Linux_source]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
path: Rakudo-Star_artifacts
- name: List my stuff
run: ls -lAR
- name: Release Rakudo-Star Windows MSI and Linux RSTAR releases
uses: ncipollo/release-action@v1
with:
# ncipollo/release-action needs a tag! Either a usual "GIT TAG" or an dedicated TAG, see below!
#tag: 2021.06 # set a TAG if you want a release to be build on GitHub _BUT_ do not provide a GIT TAG
draft: false
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "Rakudo-Star_artifacts/output/rakudo-star-*,Rakudo-Star_artifacts/output/Windows/rakudo-star-*"
token: ${{ secrets.GITHUB_TOKEN }}