Skip to content

use manual workflow dispatch to publish artifacts #12

use manual workflow dispatch to publish artifacts

use manual workflow dispatch to publish artifacts #12

Workflow file for this run

name: Publish All
on:
pull_request:
branches: [main]
jobs:
publish:
name: Build ${{ matrix.settings.target }}
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: aarch64-apple-darwin
- host: macos-latest
target: universal2-apple-darwin
- host: macos-latest
target: x86_64-apple-darwin
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/rust-cross/manylinux2014-cross:aarch64
- host: ubuntu-24.04-arm
target: aarch64-unknown-linux-musl
docker: alpine:3.21
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
docker: ghcr.io/rust-cross/manylinux2014-cross:armv7
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/rust-cross/manylinux2014-cross:x86_64
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: alpine:3.21
- host: windows-latest
target: aarch64-pc-windows-msvc
- host: windows-latest
target: i686-pc-windows-msvc
- host: windows-latest
target: x86_64-pc-windows-msvc
uses: ./.github/workflows/build.yml
with:
docker: ${{ matrix.settings.docker }}
host: ${{ matrix.settings.host }}
if: true
publish: true
setup: ${{ matrix.settings.setup }}
target: ${{ matrix.settings.target }}
secrets: inherit
tag-release:
name: Tag Release
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jrobsonchase/direnv-action@v0.7
- name: Tag Release
run: |
version="$(grep '^version =' Cargo.toml | head -n1 | awk -F\" '{print $2}')"
tag="v${version}"
git config user.name "GitHub Action"
git config user.email noreply@ngrok.com
echo "Version: ${version} tag: $tag"
echo "Fetching all tags in the repository"
git fetch --tags
if git rev-parse "refs/tags/$tag" >/dev/null 2>&1; then
echo "Tag $tag already exists, skipping tag creation."
else
echo "Tag $tag does not exist, pushing tag."
git tag -a -m "Version ${version}" $tag
git push --tags
fi