mirror of
https://gh.wpcy.net/https://github.com/LJPc-solutions/freescout-whmcs-module.git
synced 2026-04-18 06:52:18 +08:00
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Prepare files
|
|
run: |
|
|
mkdir LJPcWHMCSModule
|
|
# Move all files except .git, .github, and README.md into the LJPcWHMCSModule folder
|
|
find . -maxdepth 1 ! -name .git ! -name .github ! -name LJPcWHMCSModule ! -name . ! -name README.md -exec mv {} LJPcWHMCSModule/ \;
|
|
|
|
- name: Archive repository
|
|
run: |
|
|
zip -r "${GITHUB_REF_NAME}.zip" LJPcWHMCSModule
|
|
cp "${GITHUB_REF_NAME}.zip" latest.zip
|
|
|
|
- name: Create version.txt
|
|
run: echo "${GITHUB_REF_NAME}" > version.txt
|
|
|
|
- name: Upload to FTP
|
|
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
|
with:
|
|
server: ${{ secrets.FTP_SERVER }}
|
|
username: ${{ secrets.FTP_USERNAME }}
|
|
password: ${{ secrets.FTP_PASSWORD }}
|
|
local-dir: ./
|
|
server-dir: './'
|
|
exclude: |
|
|
**
|
|
!latest.zip
|
|
!${GITHUB_REF_NAME}.zip
|
|
!version.txt
|