From 3b7f482ba617bbc92e912732e7b7c4a3b8bb55ec Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Wed, 17 Jan 2024 21:03:40 +0800 Subject: [PATCH] Add release workflow (#402) --- .github/workflows/release.yaml | 23 +++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000000..da81127943 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,23 @@ +name: release +on: + push: + branches: + - main + pull_request: +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} +jobs: + release: + runs-on: ubuntu-latest + environment: ${{ github.ref == 'refs/heads/main' && 'release' || 'test' }} + steps: + - uses: actions/checkout@v4 + - uses: swatinem/rust-cache@v2 + - uses: homebrew/actions/setup-homebrew@master + - run: tools/setup.sh + - run: cargo install cargo-workspaces + - run: cargo workspaces publish -y --from-git + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + if: github.ref == 'refs/heads/main' diff --git a/.gitignore b/.gitignore index eb5a316cbd..6d1bbe1b18 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +.cargo* target