From 38314a352d180e23bd132b68649c939d9221aa62 Mon Sep 17 00:00:00 2001 From: Taso Date: Fri, 24 Sep 2021 13:50:57 -0400 Subject: [PATCH] ci(releases): Automatically create tagged release on tag push --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..8fccf42 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Release Publisher +on: + push: + tags: + - "*" +jobs: + release: + name: Tagged Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.ref }} + + - name: Get Version Tag + id: get_version_tag + run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//} + + - name: Create Release File + run: | + mkdir -p ./temp/pe-basicloading + cp -r ./{LICENSE,README.md,client.lua,fxmanifest.lua,web} ./temp/pe-basicloading + cd ./temp && zip -r pe-basicloading-${{ steps.get_version_tag.outputs.VERSION_TAG }}.zip ./pe-basicloading + + - name: Create and Upload Release + uses: marvinpinto/action-automatic-releases@v1.2.1 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + prerelease: false + files: ./temp/pe-basicloading-${{ steps.get_version_tag.outputs.VERSION_TAG }}.zip \ No newline at end of file