Skip to content

Commit

Permalink
fix(ci): added beta release
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Dec 21, 2024
1 parent 52dc3b0 commit bc98ba9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 47 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/nightly-build.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,49 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
- name: Checkout
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
- name: setup node
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version: "20.x"
- uses: pnpm/action-setup@v4
if: ${{ steps.release.outputs.release_created }}
name: Install pnpm
with:
version: 9
- name: Install dependencies
if: ${{ steps.release.outputs.release_created }}
run: pnpm install
- name: Build project
- name: Release as beta
if: ${{ ! steps.release.outputs.release_created }}
run: |
# update package version
pnpm version prerelease --no-commit-hooks --no-git-tag-version
# push changes
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "bump beta version"
git push
# now create zip file
pnpm run build
echo ${BETA_VERSION} > dist/version.txt
mkdir -p tmp/client
rsync -ar LICENSE dist tmp/client/
cd tmp
zip -X -r client.zip client
- name: Upload by ftp
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
if: ${{ ! steps.release.outputs.release_created }}
with:
server: ${{ secrets.PNM_FTP_HOST }}
username: ${{ secrets.PNM_FTP_USER }}
password: ${{ secrets.PNM_FTP_PASSWORD }}
local-dir: "./tmp/"
state-name: ".client-sync-state.json"
exclude: |
**/client/**
- name: Release as production
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit bc98ba9

Please sign in to comment.