-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (35 loc) · 1.25 KB
/
update-freemius-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
# Create zip file with the repository name
- name: Create zipfile of the repository
run: |
zip -qq -r "${{ github.event.repository.name }}.zip" $(git ls-files)
- name: Deploy to Freemius
uses: buttonizer/[email protected]
with:
file_name: "${{ github.event.repository.name }}.zip" # Use the dynamically named zip file
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 }}