Skip to content

Commit

Permalink
fix: fix release bug
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkgos committed Jan 30, 2024
1 parent a936fa0 commit 0523ac6
Showing 1 changed file with 63 additions and 53 deletions.
116 changes: 63 additions & 53 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,48 +24,48 @@ jobs:
os: ubuntu-latest
name: goup-x86_64-unknown-linux-gnu.tar.gz

- target: x86_64-unknown-linux-musl
os: ubuntu-latest
name: goup-x86_64-unknown-linux-musl.tar.gz

- target: i686-unknown-linux-musl
os: ubuntu-latest
name: goup-i686-unknown-linux-musl.tar.gz

- target: aarch64-unknown-linux-musl
os: ubuntu-latest
name: goup-aarch64-unknown-linux-musl.tar.gz

- target: arm-unknown-linux-musleabihf
os: ubuntu-latest
name: goup-arm-unknown-linux-musleabihf.tar.gz

- target: x86_64-apple-darwin
os: macOS-11
name: goup-x86_64-apple-darwin.tar.gz

- target: aarch64-apple-darwin
os: macOS-11
name: goup-aarch64-apple-darwin.tar.gz

- target: x86_64-pc-windows-msvc
os: windows-latest
name: goup-x86_64-pc-windows-msvc.zip
rustflags: -C target-feature=+crt-static

- target: i686-pc-windows-msvc
os: windows-latest
name: goup-i686-pc-windows-msvc.zip
rustflags: -C target-feature=+crt-static
# TODO: bug ring not supported
# - target: aarch64-pc-windows-msvc
# os: windows-latest
# name: goup-aarch64-pc-windows-msvc.zip
# rustflags: -C target-feature=+crt-static

- target: x86_64-unknown-freebsd
os: ubuntu-latest
name: goup-x86_64-unknown-freebsd.tar.gz
# - target: x86_64-unknown-linux-musl
# os: ubuntu-latest
# name: goup-x86_64-unknown-linux-musl.tar.gz

# - target: i686-unknown-linux-musl
# os: ubuntu-latest
# name: goup-i686-unknown-linux-musl.tar.gz

# - target: aarch64-unknown-linux-musl
# os: ubuntu-latest
# name: goup-aarch64-unknown-linux-musl.tar.gz

# - target: arm-unknown-linux-musleabihf
# os: ubuntu-latest
# name: goup-arm-unknown-linux-musleabihf.tar.gz

# - target: x86_64-apple-darwin
# os: macOS-11
# name: goup-x86_64-apple-darwin.tar.gz

# - target: aarch64-apple-darwin
# os: macOS-11
# name: goup-aarch64-apple-darwin.tar.gz

# - target: x86_64-pc-windows-msvc
# os: windows-latest
# name: goup-x86_64-pc-windows-msvc.zip
# rustflags: -C target-feature=+crt-static

# - target: i686-pc-windows-msvc
# os: windows-latest
# name: goup-i686-pc-windows-msvc.zip
# rustflags: -C target-feature=+crt-static
# # TODO: bug ring not supported
# # - target: aarch64-pc-windows-msvc
# # os: windows-latest
# # name: goup-aarch64-pc-windows-msvc.zip
# # rustflags: -C target-feature=+crt-static

# - target: x86_64-unknown-freebsd
# os: ubuntu-latest
# name: goup-x86_64-unknown-freebsd.tar.gz

runs-on: ${{ matrix.os }}
continue-on-error: true
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
if: matrix.os != 'windows-latest'
run: |
cd target/${{ matrix.target }}/release
tar czvf ../../../${{ matrix.name }} goup
tar -czvf ../../../${{ matrix.name }} goup
cd -
- name: Release | Upload artifacts
Expand All @@ -137,28 +137,38 @@ jobs:
name: goup-${{ matrix.target }}.msi
path: target/wix/goup-${{ matrix.target }}.msi

# Create GitHub release with Rust build targets and release notes
upload_artifacts:
name: Add Build Artifacts to Release
needs: [github_build]
runs-on: ubuntu-latest
steps:
- name: Generate a changelog
- name: Generate a changelog [Changelog]
uses: orhun/git-cliff-action@v2
if: matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu'
with:
config: cliff.toml
args: --latest
env:
OUTPUT: CHANGELOG.md

- name: Upload changelog artifacts [Changelog]
if: matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu'
uses: actions/upload-artifact@v4
with:
name: CHANGELOG.tar.gz
path: CHANGELOG.md

# Create GitHub release with Rust build targets and release notes
upload_artifacts:
name: Add Build Artifacts to Release
needs: [github_build]
runs-on: ubuntu-latest
steps:
- name: Setup | Artifacts
uses: actions/download-artifact@v4

- name: Setup | Checksums
run: for file in goup-*/goup-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done

run: |
for file in goup-*/goup-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
tar -zxvf CHANGELOG.tar.gz
- name: Build | Add Artifacts to Release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.md
body_path: goup-rs/CHANGELOG.md
files: goup-*/goup-*

0 comments on commit 0523ac6

Please sign in to comment.