Skip to content

chore: update depencencies #38

chore: update depencencies

chore: update depencencies #38

Workflow file for this run

name: Build Releases
on:
push:
tags:
- v*
env:
IMAGE_NAME: shadow-tls
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
build-cross:
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: full
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
- armv7-unknown-linux-musleabihf
- arm-unknown-linux-musleabi
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: ${{ matrix.target }}
toolchain: nightly
default: true
override: true
- name: Install cross
run: cargo install cross
- name: Build ${{ matrix.target }}
timeout-minutes: 120
run: |
cross build --release --target ${{ matrix.target }} &&
cp target/${{ matrix.target }}/release/shadow-tls target/${{ matrix.target }}/release/shadow-tls-${{ matrix.target }}
- name: Upload Github Assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: target/${{ matrix.target }}/release/shadow-tls-${{ matrix.target }}
prerelease: ${{ contains(github.ref, '-') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Gitlab Container Registry
uses: docker/login-action@v1
with:
registry: registry.gitlab.com
username: ${{ secrets.GITLAB_USERNAME }}
password: ${{ secrets.GITLAB_TOKEN }}
- name: Generate App Version
run: echo VERSIONED_TAG=`git describe --tags --always` >> $GITHUB_ENV
- name: Build and release Docker images
uses: docker/build-push-action@v3
with:
file: Dockerfile.action
build-args: "DOWNLOAD_BASE=https://github.com/${{ github.repository }}/releases/download/${{ env.VERSIONED_TAG }}"
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSIONED_TAG }}
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSIONED_TAG }}
registry.gitlab.com/${{ secrets.GITLAB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
registry.gitlab.com/${{ secrets.GITLAB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSIONED_TAG }}
push: true
build-unix:
runs-on: macos-latest
env:
RUST_BACKTRACE: full
strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: ${{ matrix.target }}
toolchain: nightly
default: true
override: true
- name: Build release
shell: bash
run: |
cargo build --release --target ${{ matrix.target }} &&
mv target/${{ matrix.target }}/release/shadow-tls target/${{ matrix.target }}/release/shadow-tls-${{ matrix.target }}
- name: Upload Github Assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: target/${{ matrix.target }}/release/shadow-tls-${{ matrix.target }}
prerelease: ${{ contains(github.ref, '-') }}