From 8c982dfd6382b94f07b7a6b7ad07173cd1925414 Mon Sep 17 00:00:00 2001 From: Sanzeeb Aryal Date: Tue, 5 Nov 2024 17:03:37 +0545 Subject: [PATCH] Deployment script --- .github/workflows/update-freemius-deploy.yml | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/update-freemius-deploy.yml diff --git a/.github/workflows/update-freemius-deploy.yml b/.github/workflows/update-freemius-deploy.yml new file mode 100644 index 0000000..a6d3804 --- /dev/null +++ b/.github/workflows/update-freemius-deploy.yml @@ -0,0 +1,36 @@ +name: Deploy to Freemius + +on: + push: + tags: + - '*' # Runs on every tag push + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v3 + + - name: Get Latest Tag + id: get_tag + run: | + # Fetch tags and get the latest tag + git fetch --tags + TAG=$(git describe --tags --abbrev=0) + echo "tag=$TAG" >> $GITHUB_ENV # Store in environment variable + + - name: Deploy to Freemius + uses: buttonizer/freemius-deploy@c104cc8c63c850b01f20fa642046ea76b3f7e53b # Using the PR @see https://github.com/buttonizer/freemius-deploy/pull/2 + with: + file_name: ${{ github.event.repository.name }}.zip + release_mode: pending + version: ${{ env.tag }} # Use the retrieved tag as the version + sandbox: false + env: + PUBLIC_KEY: ${{ secrets.FREEMIUS_PUBLIC_KEY }} + DEV_ID: ${{ secrets.FREEMIUS_DEV_ID }} + SECRET_KEY: ${{ secrets.FREEMIUS_SECRET_KEY }} + PLUGIN_SLUG: ${{ github.event.repository.name }} + PLUGIN_ID: ${{ secrets.FREEMIUS_PLUGIN_ID }}