-
Notifications
You must be signed in to change notification settings - Fork 41
100 lines (92 loc) · 3.76 KB
/
build_rakudo-star.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
# 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
if: github.event.ref_type == 'tag'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup VS Dev Environment
uses: compnerd/gha-setup-vsdevenv@v6
- 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
if: github.event.ref_type == 'tag'
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 }}