aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <Tyil@users.noreply.github.com>2021-01-06 14:15:52 +0100
committerGitHub <noreply@github.com>2021-01-06 14:15:52 +0100
commit44acec75287a749e3c6f96770c7cf2baa27053f4 (patch)
treea6b5540bf0c862e94544c2fe0f4b495f66377d96
parent53ce2c57f762b0d1967633a815a3dcb08b4bc268 (diff)
parenta685cc35a038e1dc6f8741540cae3f128871d05c (diff)
Merge pull request #162 from rakudo/gh-freebsd-build
Introduce a GitHub Action to build a binary package for amd64 with GNU libc
-rw-r--r--.github/workflows/binary-packages.yml58
-rw-r--r--.github/workflows/pre-release.yml26
-rw-r--r--.github/workflows/release.yml26
3 files changed, 110 insertions, 0 deletions
diff --git a/.github/workflows/binary-packages.yml b/.github/workflows/binary-packages.yml
new file mode 100644
index 0000000..6292b91
--- /dev/null
+++ b/.github/workflows/binary-packages.yml
@@ -0,0 +1,58 @@
+name: Binary Packages
+
+on:
+ release:
+ types:
+ - created
+ - released
+ - prereleased
+
+jobs:
+ amd64-gnu:
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Deduce release
+ uses: bruceadams/get-release@v1.2.2
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+
+ - name: Prepare
+ run: |
+ sudo apt update
+ sudo apt install -y cpanminus curl gcc make
+ cpanm -v ExtUtils::Command Pod::Usage
+
+ - name: Fetch
+ run: |
+ ./bin/rstar fetch
+
+ - name: Install
+ run: |
+ ./bin/rstar install -p "/tmp/ci-$GITHUB_RUN_ID"
+
+ - name: Package
+ run: |
+ COMMIT="$(git rev-parse HEAD)"
+ SOURCE_DATE_EPOCH="$(git log -1 --pretty=format:%at)"
+ cd -- "/tmp/ci-$GITHUB_RUN_ID"
+ tar -c \
+ --mtime "@$SOURCE_DATE_EPOCH" \
+ --mode=go=rX,u+rw,a-s \
+ --format=gnu \
+ --numeric-owner --owner=0 --group=0 \
+ . \
+ | gzip -9cn \
+ > "/tmp/rakudo-star-amd64-gnu-$GITHUB_SHA.tar.gz"
+
+ - name: Upload
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ with:
+ upload_url: ${{ steps.deduce_release.outputs.upload_url }}
+ asset_path: /tmp/rakudo-star-amd64-gnu-${{ env.GITHUB_SHA }}.tar.gz
+ asset_name: rakudo-star-amd64-gnu-${{ env.GITHUB_REF }}.tar.gz
+ asset_content_type: application/gzip
diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml
new file mode 100644
index 0000000..4eb0e4d
--- /dev/null
+++ b/.github/workflows/pre-release.yml
@@ -0,0 +1,26 @@
+name: Prerelease
+
+on:
+ push:
+ tags:
+ - '*-rc*'
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ with:
+ tag_name: ${{ github.ref }}
+ release_name: ${{ github.ref }}
+ body: |
+ This is a release candidate of Rakudo Star. It is ment for testing
+ purposes, to eventually release a production quality release.
+ draft: false
+ prerelease: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..f73f61c
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,26 @@
+name: Release
+
+on:
+ push:
+ tags:
+ - '*'
+ - '!*-rc*'
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ with:
+ tag_name: ${{ github.ref }}
+ release_name: ${{ github.ref }}
+ body: |
+ This is just a drill, don't panic!
+ draft: true
+ prerelease: false