diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6862f2..8cd8b0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,3 +108,32 @@ jobs: with: name: hath-rust-universal-apple-darwin path: target/release/hath-rust + release: + name: Release + needs: ["build-linux", "build-windows", "build-macos"] + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + - name: Rename artifact + run: | + mv hath-rust-x86_64-unknown-linux-gnu/hath-rust hath-rust-x86_64-unknown-linux-gnu + mv hath-rust-aarch64-unknown-linux-gnu/hath-rust hath-rust-aarch64-unknown-linux-gnu + mv hath-rust-armv7-unknown-linux-gnueabihf/hath-rust hath-rust-armv7-unknown-linux-gnueabihf + mv hath-rust-x86_64-pc-windows-msvc/hath-rust.exe hath-rust-x86_64-pc-windows-msvc.exe + mv hath-rust-i686-pc-windows-msvc/hath-rust.exe hath-rust-i686-pc-windows-msvc.exe + mv hath-rust-universal-apple-darwin/hath-rust hath-rust-universal-apple-darwin + - name: Create release + uses: softprops/action-gh-release@v1 + with: + draft: true + generate_release_notes: true + files: | + hath-rust-x86_64-unknown-linux-gnu + hath-rust-aarch64-unknown-linux-gnu + hath-rust-armv7-unknown-linux-gnueabihf + hath-rust-x86_64-pc-windows-msvc.exe + hath-rust-i686-pc-windows-msvc.exe + hath-rust-universal-apple-darwin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 86a5a7e..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Release - -on: - push: - branches: [ "dev" ] # test - # branches: [ "main" ] - # tags: [ "**" ] - -jobs: - build: - uses: ./.github/workflows/build.yml - release: - needs: build - permissions: - # write permission is required to create a github release - contents: write - runs-on: ubuntu-latest - steps: - - name: Download artifact - uses: actions/download-artifact@v4 - - name: Unpack artifact - run: | - unzip -qp hath-rust-x86_64-unknown-linux-gnu.zip > hath-rust-x86_64-unknown-linux-gnu - unzip -qp hath-rust-aarch64-unknown-linux-gnu.zip > hath-rust-aarch64-unknown-linux-gnu - unzip -qp hath-rust-armv7-unknown-linux-gnueabihf.zip > hath-rust-armv7-unknown-linux-gnueabihf - unzip -qp hath-rust-x86_64-pc-windows-msvc.zip > hath-rust-x86_64-pc-windows-msvc.exe - unzip -qp hath-rust-i686-pc-windows-msvc.zip > hath-rust-i686-pc-windows-msvc.exe - unzip -qp hath-rust-universal-apple-darwin.zip > hath-rust-universal-apple-darwin - - name: Create release - uses: softprops/action-gh-release@v1 - with: - draft: true - generate_release_notes: true - files: | - hath-rust-x86_64-unknown-linux-gnu - hath-rust-aarch64-unknown-linux-gnu - hath-rust-armv7-unknown-linux-gnueabihf - hath-rust-x86_64-pc-windows-msvc.exe - hath-rust-i686-pc-windows-msvc.exe - hath-rust-universal-apple-darwin