From 5eca41c7702d90db9c1f1562f8e3d80007a15db1 Mon Sep 17 00:00:00 2001 From: nopdan Date: Fri, 26 Jan 2024 23:39:13 +0800 Subject: [PATCH] build: add macos-arm64 strategy --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea8e83dd..88b88652 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -80,3 +80,39 @@ jobs: body: | ${{ steps.changelog.outputs.changes }} token: ${{ secrets.GITHUB_TOKEN }} + + build-mac-arm64: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "8.0.x" + + - name: Restore dependencies + run: dotnet restore ./src/ImeWlConverterCmd + + - name: Publish + run: dotnet publish --configuration Release --output ./publish ./src/ImeWlConverterCmd -a arm64 + + - name: Archive Release + run: tar -czf imewlconverter_${{ runner.os }}-aarch64.tar.gz publish/* + + - name: Update CHANGELOG + id: changelog + uses: requarks/changelog-action@v1 + with: + token: ${{ github.token }} + tag: ${{ github.ref_name }} + writeToFile: false + includeInvalidCommits: true + + - uses: ncipollo/release-action@v1 + with: + artifacts: "imewlconverter_${{ runner.os }}-aarch64.tar.gz" + allowUpdates: true + body: | + ${{ steps.changelog.outputs.changes }} + token: ${{ secrets.GITHUB_TOKEN }}