From ba8b7364f9bc271ceace8eea6ecd0292f20f9c93 Mon Sep 17 00:00:00 2001 From: minzords Date: Mon, 14 Oct 2024 14:01:50 +0200 Subject: [PATCH] feat: add CI release --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 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..759a5b7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release workflow + +on: + push: + tags: + - '*' + +permissions: + contents: write + +jobs: + release: + name: Release on GitHub + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build project + run: | + cd /home/runner/work/splitdropdown/ + rm -r splitdropdown/.git* + tar -zcvf splitdropdown-${{ github.ref_name }}.tgz splitdropdown + + - name: Upload release + uses: actions/upload-artifact@v4 + with: + name: splitdropdown-${{ github.ref_name }}.tgz + path: /home/runner/work/splitdropdown/splitdropdown-${{ github.ref_name }}.tgz + + - name: Create release + uses: softprops/action-gh-release@v2 + with: + files: /home/runner/work/gdprcompliance/splitdropdown-${{ github.ref_name }}.tgz + body: "New release is available" + name: ${{ github.ref_name }} + draft: true + generate_release_notes: true