From b838d35e0ca34f11d0dd1c009a7cb7c645edaf0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Wed, 22 Feb 2023 19:20:57 -0800 Subject: [PATCH] Add publish workflow This change adds a new workflow that we can use for publishing a new version of the crate. The workflow has to manually be invoked and will then perform the publishing from a more or less well-defined CI environment. --- .github/workflows/publish.yml | 27 +++++++++++++++++++++++++++ .github/workflows/test.yml | 1 + CHANGELOG.md | 1 + 3 files changed, 29 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..40d92c55 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +# Copyright (C) 2023 The apca Developers +# SPDX-License-Identifier: GPL-3.0-or-later + +name: Publish + +on: + workflow_dispatch: + +jobs: + test: + uses: ./.github/workflows/test.yml + secrets: inherit + publish: + needs: [test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Publish apca + run: cargo publish --no-verify --token "${CARGO_REGISTRY_TOKEN}" + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f33d6d2..6161c087 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,7 @@ name: Test on: push: pull_request: + workflow_call: env: CARGO_TERM_COLOR: always diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b7b0ca5..01687c1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ Unreleased ---------- - Introduced `vendored-openssl` to build with vendored `openssl` library +- Added GitHub Actions workflow for publishing the crate 0.26.1