Skip to content

Update version to 0.5.9 #35

Update version to 0.5.9

Update version to 0.5.9 #35

Workflow file for this run

name: deploy
on:
push:
tags:
- "*.*.*"
jobs:
build_binary:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: "Cache builder image"
id: cache-builder-image
uses: actions/cache@v3
with:
path: musl-builder-image
key: musl-builder-image
- name: "Pull and save builder image"
if: steps.cache-builder-image.outputs.cache-hit != 'true'
run: |
docker pull ekidd/rust-musl-builder:stable
docker save ekidd/rust-musl-builder:stable -o musl-builder-image
- name: "Load builder image"
run: docker load -i musl-builder-image
- name: "Cache Rust"
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: "Build binary"
run: docker run --rm -u root -v `pwd`:/home/rust/src ekidd/rust-musl-builder:stable cargo build --release
- name: "Upload binary"
uses: actions/upload-artifact@v3
with:
name: yevis
path: target/x86_64-unknown-linux-musl/release/yevis
create_release:
needs: [build_binary]
runs-on: ubuntu-latest
steps:
- name: "Download yevis binary"
uses: actions/download-artifact@v3
with:
name: yevis
- name: "Release"
run: gh release --repo ${{ github.repository }} create ${{ github.ref_name }} --title ${{ github.ref_name }} --generate-notes yevis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy_ghcr:
needs: [create_release]
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v2
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v2
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build and push"
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/yevis-cli:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/yevis-cli:latest