Skip to content

Commit

Permalink
(Hopefully) fix windows binary build and add musl binary build
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenc committed Jul 11, 2020
1 parent 7821136 commit 1dc2580
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ jobs:
run: cargo install cargo-wix
- name: Release
run: |
cargo build --verbose --release --no-default-features --features rustls-tls
cargo build --verbose --release
cargo wix --no-build --nocapture
(cargo pkgid) -replace "^.*#","" -replace "([^0-9.].*)?$","" -replace "^","::set-env name=BUILD_VERSION::"
- name: Run tests
run: cargo test --verbose --release --no-default-features --features rustls-tls
run: cargo test --verbose --release
- name: Pick up upload URL
uses: actions/download-artifact@v1
with:
Expand Down Expand Up @@ -155,3 +155,45 @@ jobs:
asset_path: target/wix/juxr-${{ env.BUILD_VERSION }}-x86_64.msi
asset_name: juxr-${{ env.target_triple }}.msi
asset_content_type: application/x-msi
docker:
name: Publish Docker image
runs-on: ubuntu-latest
needs: [prepare]
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Docker build
run: |
mkdir -p target
docker build --tag juxr:build --target build .
docker build --tag juxr:latest .
ID=$(docker run -d juxr:build cat)
docker cp $ID:/home/rust/.cargo/bin/juxr ./target/
docker rm --force $ID
tar -czf target/juxr-x86_64-unknown-linux-musl.tar.gz -C target juxr
# - name: Docker push
# uses: mr-smithers-excellent/docker-build-push@v2
# with:
# image: stephenc/juxr
# registry: docker.io
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- name: Pick up upload URL
uses: actions/download-artifact@v1
with:
name: release-upload-url
- name: Prepare to upload artifacts
shell: bash
run: |
cat release-upload-url/release-upload-url.txt
rm -rf release-upload-url/
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.release_upload_url }}
asset_path: target/juxr-x86_64-unknown-linux-musl.tar.gz
asset_name: juxr-x86_64-unknown-linux-musl.tar.gz
asset_content_type: application/tar+gzip

0 comments on commit 1dc2580

Please sign in to comment.