From ea22f771d24beb54c95a8e8e77a644604bfba197 Mon Sep 17 00:00:00 2001 From: coderatul Date: Sun, 3 Mar 2024 00:38:12 +0530 Subject: [PATCH 1/3] added release workflow --- .github/workflows/release.yml | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 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..3b9e04fe --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: Create Release + +on: + push: + tags: + - v[0-9]+.[0-9]+.[0-9]+ + +jobs: + build_and_release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install build + python -m pip install wheel + + - name: Build distribution + run: python -m build + + - name: Create ZIP archive + run: | + cd dist + zip -r ../codebase.zip . + working-directory: ${{ github.workspace }} + + - name: Upload release asset + uses: actions/upload-artifact@v3 + with: + name: codebase + + - uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + body_path: CHANGELOG.md # Optional: Path to a file containing release notes + draft: false # Set to true for draft releases + prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }} # Set to true for pre-releases with specific tags + assets: ${{ github.workspace }}/codebase.zip From 81befc361345d09e8e20202513e3e8a22e7ca4ed Mon Sep 17 00:00:00 2001 From: Atul Kushwaha Date: Sun, 3 Mar 2024 13:47:23 +0530 Subject: [PATCH 2/3] Update release.yml --- .github/workflows/release.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b9e04fe..aa925a63 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,18 +17,13 @@ jobs: with: python-version: '3.11' - - name: Install dependencies - run: | - python -m pip install build - python -m pip install wheel - - name: Build distribution run: python -m build - name: Create ZIP archive run: | cd dist - zip -r ../codebase.zip . + zip -r ../open5e-api-${{ github.ref }}.zip . working-directory: ${{ github.workspace }} - name: Upload release asset @@ -41,6 +36,6 @@ jobs: tag_name: ${{ github.ref }} release_name: ${{ github.ref }} body_path: CHANGELOG.md # Optional: Path to a file containing release notes - draft: false # Set to true for draft releases + draft: true # Set to true for draft releases prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }} # Set to true for pre-releases with specific tags - assets: ${{ github.workspace }}/codebase.zip + assets: ${{ github.workspace }}/open5e-api-${{ github.ref }}.zip From 3e3fe35994c8b585fe83b6fc83cb7861c1fc3f7b Mon Sep 17 00:00:00 2001 From: Atul Kushwaha Date: Mon, 4 Mar 2024 01:36:33 +0530 Subject: [PATCH 3/3] removed build distribution release.yml --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aa925a63..ec76dfac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,9 +17,6 @@ jobs: with: python-version: '3.11' - - name: Build distribution - run: python -m build - - name: Create ZIP archive run: | cd dist