From 56ad346f965790636ab51b4070fe89cc7f6d858b Mon Sep 17 00:00:00 2001 From: Scott Tomaszewski Date: Sat, 12 Oct 2024 08:13:02 -0400 Subject: [PATCH] Adds release CI support --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7a73d5c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: Build and Release + +on: + push: + branches: + - backer + - patron + - main + +permissions: + contents: write # Grant write permissions to the contents scope + +jobs: + build_and_release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Fetch all history for tags + + - name: Create zip archive + run: | + zip -r repo.zip . -x ".git/*" + + - name: Determine Tag Name + id: tag_name + run: | + TAG_NAME=$(date +%Y%m%d%H%M%S) + echo "tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}.$TAG_NAME" >> $GITHUB_OUTPUT + + - name: Create GitHub Release + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.tag_name.outputs.tag }} + name: Release ${{ steps.tag_name.outputs.tag }} + artifacts: repo.zip + draft: false + prerelease: false +