|
| 1 | +name: Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + - 'test-v*' |
| 8 | + pull_request: |
| 9 | + |
| 10 | +env: |
| 11 | + ALPINE_VERSION: 3.13.5 |
| 12 | + DOCKER_BUILDKIT: 1 |
| 13 | + |
| 14 | +jobs: |
| 15 | + release: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + timeout-minutes: 60 |
| 18 | + |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + with: |
| 22 | + fetch-depth: 1 |
| 23 | + submodules: recursive |
| 24 | + persist-credentials: false |
| 25 | + |
| 26 | + - name: Install the arm64 emulator for binfmt_misc |
| 27 | + run: | |
| 28 | + docker run --privileged --rm tonistiigi/binfmt --install arm64 |
| 29 | +
|
| 30 | + - name: Build the mkimage images |
| 31 | + run: | |
| 32 | + make mkimage ARCH=x86_64 |
| 33 | + make mkimage ARCH=aarch64 |
| 34 | +
|
| 35 | + - name: Build the std edition |
| 36 | + run: | |
| 37 | + make iso EDITION=std ARCH=x86_64 |
| 38 | + make iso EDITION=std ARCH=aarch64 |
| 39 | +
|
| 40 | + - name: Build the rd edition |
| 41 | + run: | |
| 42 | + make iso EDITION=rd ARCH=x86_64 |
| 43 | + make iso EDITION=rd ARCH=aarch64 |
| 44 | +
|
| 45 | + - name: Create release |
| 46 | + if: github.event_name != 'pull_request' |
| 47 | + env: |
| 48 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 49 | + # Note "folded" style; requires a blank line to insert actual newline |
| 50 | + run: > |
| 51 | + tag="${GITHUB_REF##*/}" |
| 52 | +
|
| 53 | + hub release create |
| 54 | + -a iso/alpine-lima-std-${ALPINE_VERSION}-aarch64.iso |
| 55 | + -a iso/alpine-lima-std-${ALPINE_VERSION}-aarch64.iso.sha512sum |
| 56 | + -a iso/alpine-lima-std-${ALPINE_VERSION}-x86_64.iso |
| 57 | + -a iso/alpine-lima-std-${ALPINE_VERSION}-x86_64.iso.sha512sum |
| 58 | + -a iso/alpine-lima-rd-${ALPINE_VERSION}-aarch64.iso |
| 59 | + -a iso/alpine-lima-rd-${ALPINE_VERSION}-aarch64.iso.sha512sum |
| 60 | + -a iso/alpine-lima-rd-${ALPINE_VERSION}-x86_64.iso |
| 61 | + -a iso/alpine-lima-rd-${ALPINE_VERSION}-x86_64.iso.sha512sum |
| 62 | + -m "${tag}" --draft "${tag}" |
0 commit comments