bump version to 1.6.1 #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: '*' | |
jobs: | |
publish_crates: | |
name: publish crates | |
runs-on: macos-10.15 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: publish | |
run: | | |
cargo login ${{ secrets.CRATESIO_APIKEY }} | |
sleep 3 | |
cd fhttp-core | |
for i in 1 2; do cargo publish && break; done | |
cd - | |
sleep 3 | |
cd fhttp-test-utils | |
for i in 1 2; do cargo publish && break; done | |
cd - | |
sleep 10 | |
cd fhttp | |
for i in 1 2; do cargo publish && break; done | |
cd - | |
create_release: | |
name: create release | |
runs-on: macos-10.15 | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
prerelease: false | |
build_osx: | |
name: build osx | |
runs-on: macos-10.15 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: build | |
run: for i in 1 2; do cargo build --release --workspace && break; done | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: fhttp.macosx | |
path: target/release/fhttp | |
release_macosx: | |
name: release macosx | |
runs-on: ubuntu-20.04 | |
needs: | |
- build_osx | |
- create_release | |
steps: | |
- name: download binary | |
uses: actions/download-artifact@v2 | |
with: | |
name: fhttp.macosx | |
path: target/release | |
- name: tarball binary | |
run: | | |
cd target/release | |
tar -czf fhttp.macosx.tar.gz fhttp | |
cd - | |
- name: create tarball sha | |
id: tarball_sha | |
run: echo "::set-output name=tarball_sha::$(shasum -a 256 target/release/fhttp.macosx.tar.gz |cut -f1 -d ' ')" | |
- name: rename file | |
run: mv target/release/fhttp target/release/fhttp.macosx | |
- name: Upload binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: target/release/fhttp.macosx | |
asset_name: fhttp.macosx | |
asset_content_type: application/octet-stream | |
- name: Upload tarball | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: target/release/fhttp.macosx.tar.gz | |
asset_name: fhttp.macosx.tar.gz | |
asset_content_type: application/octet-stream | |
- name: trigger homebrew-fhttp | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
repository: Leopard2A5/homebrew-fhttp | |
token: ${{ secrets.HOMEBREW_TRIGGER_KEY }} | |
event-type: new-release | |
client-payload: '{ "tag": "${{ github.ref }}", "sha": "${{ steps.tarball_sha.outputs.tarball_sha }}" }' | |
release_linux: | |
name: release linux | |
runs-on: ubuntu-20.04 | |
needs: create_release | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: build | |
run: for i in 1 2; do cargo build --release --workspace; done | |
- name: make executable | |
run: chmod +x target/release/fhttp | |
- name: rename file | |
run: mv target/release/fhttp target/release/fhttp.linux_x64 | |
- name: Upload binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: target/release/fhttp.linux_x64 | |
asset_name: fhttp.linux_x64 | |
asset_content_type: application/octet-stream | |
test_cargo_install_ubuntu: | |
name: test cargo install ubuntu | |
needs: publish_crates | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: test | |
uses: ./actions/ubuntu-latest | |
id: test_cargo_install_ubuntu | |
with: | |
run: ./check_cargo_installation.sh "${{ github.ref }}" | |
test_binary_download_ubuntu: | |
name: test binary download ubuntu | |
needs: release_linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: test | |
uses: ./actions/ubuntu-latest | |
id: test_binary_download_ubuntu | |
with: | |
run: ./check_direct_download_ubuntu.sh "${{ github.ref }}" |