Skip to content

0.2.5

0.2.5 #44

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
tags:
- "frontend-v*"
- "v*"
jobs:
build_static:
uses: ministruth/.github/.github/workflows/build_static.yml@main
with:
upload: true
build_skynet:
uses: ministruth/.github/.github/workflows/build.yml@main
with:
prefix: skynet
upload: true
args: -p skynet
release:
needs: [build_static, build_skynet]
uses: ministruth/.github/.github/workflows/release.yml@main
with:
prefix: skynet
static: true
cmd: |
rm -rf */plugin/*
mkdir -p skynet-linux-x86_64/assets/_plugin
mkdir -p skynet-linux-i686/assets/_plugin
mkdir -p skynet-linux-aarch64/assets/_plugin
mkdir -p skynet-windows-x86_64/assets/_plugin
mkdir -p skynet-macOS-x86_64/assets/_plugin
mkdir -p skynet-macOS-aarch64/assets/_plugin
publish_crate:
needs: build_skynet
name: Publish crate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
- name: Push to crate.io
run: |
cd skynet_macro
cargo publish --no-verify || true
cd -
cd skynet_api
cargo publish --no-verify || true
cd -
push_dockerhub:
needs: build_skynet
name: Push to dockerhub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: imwxz/skynet
- uses: actions/download-artifact@v4
with:
path: release
pattern: skynet-linux-*
merge-multiple: true
- uses: actions/download-artifact@v4
with:
name: static
path: assets
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- run: |
cd release
cp -r ../assets skynet-linux-x86_64
cp -r ../assets skynet-linux-aarch64
mv skynet-linux-x86_64 amd64
mkdir -p amd64/assets/_plugin
mv skynet-linux-aarch64 arm64
mkdir -p amd64/assets/_plugin
cd -
- name: Build and push aarch64
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}