Skip to content

Commit

Permalink
Fix linux-gnu release build (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee authored May 22, 2024
1 parent fd8221a commit 9c1e6d5
Showing 1 changed file with 50 additions and 51 deletions.
101 changes: 50 additions & 51 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ jobs:
# arch: aarch64

runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: olegtarasov/[email protected]
id: tagName
Expand All @@ -84,7 +83,7 @@ jobs:
- name: Setup | Rust
uses: actions-rs/[email protected]
with:
toolchain: nightly
toolchain: stable
override: true
profile: minimal
target: ${{ matrix.target }}
Expand All @@ -93,7 +92,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path autocorrect-cli/Cargo.toml --release --target ${{ matrix.target }} -Z unstable-options --config 'package.version="${{ steps.tagName.outputs.version }}"'
args: --manifest-path autocorrect-cli/Cargo.toml --release --target ${{ matrix.target }} --config 'package.version="${{ steps.tagName.outputs.version }}"'
use-cross: ${{ matrix.os == 'ubuntu-latest' }}

- name: Prepare artifacts [Windows]
Expand Down Expand Up @@ -140,7 +139,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -154,49 +153,49 @@ jobs:
ls -lha release-dist
for file in release-dist/**/*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: release-dist/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docker:
runs-on: ubuntu-latest
needs: github_release
steps:
- uses: olegtarasov/[email protected]
id: tagName

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: |
huacnlee/autocorrect:latest
huacnlee/autocorrect:${{ steps.tagName.outputs.tag }}
- name: Build and push (reviewdog)
uses: docker/build-push-action@v2
with:
push: true
file: ./Dockerfile.reviewdog
tags: |
huacnlee/autocorrect:latest-reviewdog
huacnlee/autocorrect:${{ steps.tagName.outputs.tag }}-reviewdog
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
# - name: Publish
# uses: softprops/action-gh-release@v1
# with:
# files: release-dist/**/*
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# docker:
# runs-on: ubuntu-latest
# needs: github_release
# steps:
# - uses: olegtarasov/[email protected]
# id: tagName

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1

# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Build and push
# id: docker_build
# uses: docker/build-push-action@v2
# with:
# push: true
# tags: |
# huacnlee/autocorrect:latest
# huacnlee/autocorrect:${{ steps.tagName.outputs.tag }}

# - name: Build and push (reviewdog)
# uses: docker/build-push-action@v2
# with:
# push: true
# file: ./Dockerfile.reviewdog
# tags: |
# huacnlee/autocorrect:latest-reviewdog
# huacnlee/autocorrect:${{ steps.tagName.outputs.tag }}-reviewdog

# - name: Image digest
# run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 9c1e6d5

Please sign in to comment.