From eab85a890358706d77799e1c1d9b432b990430eb Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 28 Jan 2024 09:09:00 -0800 Subject: [PATCH] Set up an autorelease pipeline This commit adds a pipeline that automatically creates a GitHub Release and a crates.io release when a tag is pushed. Signed-off-by: John Nunley --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ade9c37 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release + +permissions: + contents: write + +on: + push: + tags: + - v[0-9]+.* + +jobs: + create-release: + if: github.repository_owner == 'rust-windowing' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: taiki-e/create-gh-release-action@v1 + with: + changelog: CHANGELOG.md + branch: master + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + - run: | + cargo login ${{ secrets.CRATES_IO_API_TOKEN }} + cargo publish