2121 - name : Run tests
2222 run : cargo test
2323
24- prepare-release :
24+ prepare_release :
2525 needs : test
26+ name : Prepare Github Release
2627 runs-on : ubuntu-latest
2728 outputs :
2829 pkg_ver : ${{ steps.capture_version_from_cargo.pkg_ver }}
@@ -46,21 +47,21 @@ jobs:
4647 gh release create \
4748 --title v$PKG_VER --notes-file RELEASE.md $PKG_VER
4849
49- publish :
50- needs : prepare-release
51- name : publish
50+ publish_crate :
51+ needs : prepare_release
52+ name : publish crate
5253 runs-on : ubuntu-latest
5354 strategy :
5455 matrix :
5556 build :
56- - linux gnu x64
57+ - linux gnu x86_64
5758 # - linux musl x64
5859 include :
5960 # - build: linux musl x64
6061 # os: ubuntu-latest
6162 # rust: stable
6263 # rust_target: x86_64-unknown-linux-musl
63- - build : linux gnu x64
64+ - build : linux gnu x86_64
6465 os : ubuntu-latest
6566 rust : stable
6667 rust_target : x86_64-unknown-linux-gnu
7879 - name : Build
7980 run : cargo build -r --target ${{ matrix.rust_target }}
8081
82+ - name : Adjust Target Name
83+ run : |
84+ cp \
85+ target/${{ matrix.rust_target }}/release/http_status_code_check \
86+ target/${{ matrix.rust_target }}/release/http_status_code_check-${{ matrix.rust_target }}
87+
88+ # TODO maybe split this publish into two: crates.io and github?
89+ # - name: Upload Target
90+ # uses: actions/upload-artifact@v2
91+ # with:
92+ # name: ${{ matrix.rust_target }}
93+ # path: target/${{ matrix.rust_target }}/release/http_status_code_check-${{ matrix.rust_target }}
94+ # retention-days: 1
95+
8196 # - name: Publish to crates.io
8297 # env:
8398 # CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
86101 - name : Publish to Github Releases
87102 env :
88103 GH_TOKEN : ${{ secrets.GH_TOKEN }}
89- PKG_VER : ${{ needs.prepare-release.outputs.pkg_ver }}
90- run : |
91- cp target/release/http_status_code_check target/release/http_status_code_check-${{ matrix.rust_target }}
92- gh release upload $PKG_VER target/release/http_status_code_check-${{ matrix.rust_target }}
104+ PKG_VER : ${{ needs.prepare_release.outputs.pkg_ver }}
105+ run : gh release upload $PKG_VER target/${{ matrix.rust_target }}/release/http_status_code_check-${{ matrix.rust_target }}
0 commit comments