From 3f47ee876b4f3bd3775213283b6b68bed6735e8a Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 28 Jan 2024 09:09:00 -0800 Subject: [PATCH 1/2] 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 00000000..ade9c37e --- /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 From 1e5361ec3a84ca4236855d72fcda0625eb368cac Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 28 Jan 2024 12:30:45 -0800 Subject: [PATCH 2/2] Use --token Signed-off-by: John Nunley --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ade9c37e..a3f7c57b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,5 @@ jobs: branch: master env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - - run: | - cargo login ${{ secrets.CRATES_IO_API_TOKEN }} - cargo publish + - name: Publish to crates.io + run: cargo publish --token ${{ secrets.CRATES_IO_API_TOKEN }}