From 02655186f6122cb530f0f254dc66b7cb5d83a56b Mon Sep 17 00:00:00 2001 From: xormenter <94999291+xormenter@users.noreply.github.com> Date: Sun, 11 Dec 2022 00:15:32 +0100 Subject: [PATCH] Create publish.yml --- .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8def0e0 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +# This is a basic workflow to help you get started with Actions +name: Publish Release + +on: + release: + types: [published] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - name: Zip Folder + run: | # Zip the entire repository + zip -r lordysmods-${{ github.ref_name }}.zip . -x ".git/*" ".github/*" ".gitignore" + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: lordysmods-${{ github.ref_name }}.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +