Skip to content

Commit

Permalink
fix: added release-please
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Nov 3, 2024
1 parent 18c3110 commit e42e715
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/release-client.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,56 @@
name: Build and release client
on:
release:
types: [ published ]
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
build:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
- name: Checkout
if: ${{ steps.release.outputs.releases_created }}
uses: actions/checkout@v4
- name: setup node
if: ${{ steps.release.outputs.releases_created }}
uses: actions/setup-node@v4
with:
node-version: "20.x"
- uses: pnpm/action-setup@v4
if: ${{ steps.release.outputs.releases_created }}
name: Install pnpm
with:
version: 9
- name: Build project
run: |
pnpm install
pnpm run build
## save latest version tag
TAG_NAME=$(curl -sL https://api.github.com/repos/mynaparrot/plugNmeet-client/releases/latest | jq -r ".tag_name")
echo $TAG_NAME > dist/version.txt
mkdir -p tmp/client
rsync -ar LICENSE dist tmp/client/
cd tmp
zip -X -r client.zip client
- name: Upload artifact
if: ${{ steps.release.outputs.releases_created }}
uses: actions/upload-artifact@v4
with:
name: upload client
path: tmp/client.zip
- name: Upload to release
if: ${{ steps.release.outputs.releases_created }}
uses: JasonEtco/upload-to-release@master
with:
args: tmp/client.zip application/zip
Expand Down

0 comments on commit e42e715

Please sign in to comment.