-
Notifications
You must be signed in to change notification settings - Fork 76
60 lines (52 loc) · 1.71 KB
/
Copy pathrelease.yml
File metadata and controls
60 lines (52 loc) · 1.71 KB
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
name: Package and release on Github
on:
push:
branches:
- main
tags:
- canary/*
jobs:
build-debs:
strategy:
matrix:
runner: [ubuntu-latest, shopify-ubuntu-arm64]
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v6.0.2
- name: Setup Go
uses: actions/setup-go@v6.4.0
with:
go-version: "1.26.2"
- name: Building Ghostferry
run: .github/workflows/build-deb.sh
- name: Upload debs
uses: actions/upload-artifact@v7.0.1
with:
name: debs-${{ github.sha }}-${{ matrix.runner }}
path: build/ghostferry*
release:
runs-on: ubuntu-latest
needs: build-debs
steps:
- uses: actions/checkout@v6.0.2
- name: Fetch uploaded artifacts
uses: actions/download-artifact@v8.0.1
with:
pattern: debs-${{ github.sha }}-*
merge-multiple: true
- name: shasum
shell: bash
run: |
sha256sum *.deb > ghostferry-$GITHUB_SHA.sha256sum
echo "sha256sum:"
cat ghostferry-$GITHUB_SHA.sha256sum
- name: Releasing production Ghostferry
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
run: gh release create release-${GITHUB_SHA::7} --target ${{ github.ref_name }} --prerelease ghostferry*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Releasing canary Ghostferry
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'canary/') }}
run: gh release create ${{github.ref_name}} --prerelease --verify-tag --notes-from-tag --latest=false ghostferry*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}