Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
Add release workflow and fix arm
Browse files Browse the repository at this point in the history
  • Loading branch information
harmless-tech committed Apr 5, 2024
1 parent 58ece4b commit 0914fc6
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
with:
context: ./
file: ./docker/${{ matrix.target }}.Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
pull: true
push: false
tags: ink-toolchain:dev
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release

on:
push:
tags:
- "v**"
workflow_dispatch:

permissions:
contents: write

jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ amd64, arm64 ]
target:
- aarch64-unknown-linux-musl
- armv7-unknown-linux-musleabihf
- x86_64-unknown-linux-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Docker Setup Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/${{ matrix.target }}.Dockerfile
no-cache: true
pull: true
push: false
tags: ink-toolchain:dev
platforms: linux/${{ matrix.platform }}
builder: ${{ steps.buildx.outputs.name }}
- name: Extract
run: TARGETARCH='${{ matrix.platform }}' ./scripts/extract.sh
- name: Rename
shell: bash
working-directory: ./export
run: for f in *.tar.gz; do mv "$f" "${{ matrix.platform }}+$f"; done
- name: Hash
shell: bash
working-directory: ./export
run: for f in *.tar.gz; do sha256sum "$f" > "$f".sha256; done
- name: Create and push artifacts to release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
name: ${{ github.ref_name }}
allowUpdates: true
artifacts: "./export/*.tar.gz,./export/*.sha256"
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ TODO

```shell
docker buildx build \
--log-opt max-size=50m \
-f ./docker/$TARGET.Dockerfile \
-t ink-toolchain:dev \
.
Expand Down

0 comments on commit 0914fc6

Please sign in to comment.