From 85dfc1ce8cd393f2638282917158ae2869bd1144 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Wed, 8 Jan 2025 12:05:26 -0800 Subject: [PATCH 1/5] Add automation to build releases --- .gitea/workflows/release.yml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .gitea/workflows/release.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..906cca9 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,40 @@ +name: Create Release + +on: + push: + branches: + - main + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Get version + id: get_version + run: | + if [ "${{ github.ref_type }}" = "tag" ]; then + echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + else + echo "version=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_OUTPUT + fi + + - name: Create ZIP archive + run: | + zip -r fourthwall-store-embed.zip . -x ".git/*" ".gitea/*" + + - name: Create Release + uses: actions/release@v1 + with: + username: ${{ secrets.CI_USER }} + password: ${{ secrets.CI_TOKEN }} + title: Release ${{ steps.get_version.outputs.version }} + tag_name: ${{ steps.get_version.outputs.version }} + files: | + fourthwall-store-embed.zip + draft: false + prerelease: false From 387483f31ffcfee6b31ff2331e389eadf76206c5 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Wed, 8 Jan 2025 12:08:04 -0800 Subject: [PATCH 2/5] Add automation to build releases --- .gitea/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 906cca9..762e1be 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -12,7 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + username: ${{ secrets.CI_USER }} + password: ${{ secrets.CI_TOKEN }} - name: Get version id: get_version From 48f44ab13af046e7b67cbbc8753b46dc93990f6b Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Wed, 8 Jan 2025 12:31:24 -0800 Subject: [PATCH 3/5] Updating to use more up-to-date release --- .gitea/workflows/release.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 762e1be..f5cf4ec 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -4,8 +4,6 @@ on: push: branches: - main - tags: - - 'v*' jobs: build: @@ -31,11 +29,10 @@ jobs: zip -r fourthwall-store-embed.zip . -x ".git/*" ".gitea/*" - name: Create Release - uses: actions/release@v1 + uses: marvinpinto/action-automatic-releases@latest with: - username: ${{ secrets.CI_USER }} - password: ${{ secrets.CI_TOKEN }} - title: Release ${{ steps.get_version.outputs.version }} + repo_token: "${{ secrets.REPO_TOKEN }}" + title: Fourthwall-store-embed Release ${{ steps.get_version.outputs.version }} tag_name: ${{ steps.get_version.outputs.version }} files: | fourthwall-store-embed.zip From c733ae69b97a0fe349c9da2b2919db171b507950 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Wed, 8 Jan 2025 12:36:28 -0800 Subject: [PATCH 4/5] Updating to use more up-to-date release --- .gitea/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index f5cf4ec..3dce58b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -34,6 +34,7 @@ jobs: repo_token: "${{ secrets.REPO_TOKEN }}" title: Fourthwall-store-embed Release ${{ steps.get_version.outputs.version }} tag_name: ${{ steps.get_version.outputs.version }} + automatic_release_tag: latest files: | fourthwall-store-embed.zip draft: false From 49785e611c5731af91d3eeb3059e78c1b3bf019b Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Wed, 8 Jan 2025 13:39:12 -0800 Subject: [PATCH 5/5] Use updated module --- .gitea/workflows/release.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 3dce58b..d20d6b7 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -29,13 +29,10 @@ jobs: zip -r fourthwall-store-embed.zip . -x ".git/*" ".gitea/*" - name: Create Release - uses: marvinpinto/action-automatic-releases@latest + uses: softprops/action-gh-release@v2 with: - repo_token: "${{ secrets.REPO_TOKEN }}" + token: "${{ secrets.REPO_TOKEN }}" title: Fourthwall-store-embed Release ${{ steps.get_version.outputs.version }} tag_name: ${{ steps.get_version.outputs.version }} - automatic_release_tag: latest files: | fourthwall-store-embed.zip - draft: false - prerelease: false