From c5fd42c35aa47d6005ad639ae3fff796f9da3fab Mon Sep 17 00:00:00 2001 From: winston Date: Wed, 23 Aug 2023 12:22:53 +0200 Subject: [PATCH] ci: use release-please --- .github/workflows/release-please.yml | 36 ++++++++++++++++++++++++++++ .github/workflows/release.yml | 21 ---------------- version.txt | 1 + 3 files changed, 37 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/release-please.yml delete mode 100644 .github/workflows/release.yml create mode 100644 version.txt diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..94d89fd --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,36 @@ +on: + push: + branches: [main] + +name: release-please + +permissions: + contents: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: simple + + - uses: denoland/setup-deno@v1 + if: ${{ steps.release.outputs.release_created }} + with: + deno-version: v1.x + + - run: deno task build + if: ${{ steps.release.outputs.release_created }} + + - name: Create tarball + if: ${{ steps.release.outputs.release_created }} + run: tar czf catppuccin-gitea.tar.gz --directory=./dist . + + - name: Upload Release Artifacts + if: ${{ steps.release.outputs.release_created }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: + gh release upload ${{ steps.release.outputs.tag_name }} ./artifact/some-build-artifact.zip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 5a54058..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Release -on: - push: - tags: - - "v*" - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.x - - run: deno task build - - name: Create tarball - run: tar czf catppuccin-gitea.tar.gz --directory=./dist . - - name: Add zips to release - uses: softprops/action-gh-release@v1 - with: - files: ./catppuccin-gitea.tar.gz diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..9e11b32 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.3.1