From 492aa947e6871cd349a9d578420d04b20c72cdbf Mon Sep 17 00:00:00 2001 From: Dunak <19434539+dunak-debug@users.noreply.github.com> Date: Fri, 17 Sep 2021 01:09:38 +0200 Subject: [PATCH] Create pre-release.yml --- .github/workflows/pre-release.yml | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/pre-release.yml diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml new file mode 100644 index 0000000..680db69 --- /dev/null +++ b/.github/workflows/pre-release.yml @@ -0,0 +1,48 @@ +name: Pre-Release + +on: + workflow_dispatch: + inputs: + tag: + description: 'Version tag' + required: true + +jobs: + create-release: + name: Build and Create Tagged Pre release + runs-on: ubuntu-latest + + steps: + - name: Install archive tools + run: sudo apt install zip + + - name: Checkout source code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.ref }} + + - name: Install dependencies + run: yarn + + - name: Run build + run: yarn build + + - name: Bundle files + run: | + mv dist oxmysql + zip -r oxmysql-${{ github.event.inputs.tag }}.zip oxmysql + + - name: Create Release + uses: "marvinpinto/action-automatic-releases@v1.2.1" + id: auto_release + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + title: "Experimental - ${{ github.event.inputs.tag }}" + prerelease: true + automatic_release_tag: "${{ github.event.inputs.tag }}-alpha" + files: oxmysql-${{ github.event.inputs.tag }}.zip + + env: + CI: false + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}