Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit f43acf3

Browse files
committed
feat: add actions workflow
1 parent 1f5f0a1 commit f43acf3

2 files changed

Lines changed: 92 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build release pack
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Checkout tag
15+
run: |
16+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
17+
tag_name="${GITHUB_REF##*/}"
18+
echo Tag $tag_name
19+
git checkout $tag_name
20+
echo "TAG_NAME=${tag_name}" >> $GITHUB_ENV
21+
22+
- name: Install Node.js
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: 16
26+
27+
- name: Install pnpm
28+
uses: pnpm/action-setup@v2
29+
id: pnpm-install
30+
with:
31+
version: latest
32+
33+
- name: Install Dependencies
34+
run: pnpm install
35+
36+
- name: Build
37+
run: pnpm build
38+
39+
- name: Package
40+
run: |
41+
cd ./dist/
42+
zip -r ../crosssync-${{ env.TAG_NAME }}.zip ./
43+
cd ../
44+
45+
- name: Release
46+
uses: softprops/action-gh-release@v1
47+
with:
48+
draft: true
49+
name: CrossSync - ${{ env.TAG_NAME }}
50+
tag_name: ${{ env.TAG_NAME }}
51+
files: ./crosssync-${{ env.TAG_NAME }}.zip
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build-test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build test pack
2+
3+
on:
4+
push:
5+
branches: [develop, release/*]
6+
pull_request:
7+
branches: [develop]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Install Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 16
21+
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v2
24+
id: pnpm-install
25+
with:
26+
version: latest
27+
28+
- name: Install Dependencies
29+
run: pnpm install
30+
31+
- name: Build
32+
run: pnpm build
33+
34+
- name: Pack and upload Artifact
35+
uses: actions/upload-artifact@v2
36+
with:
37+
name: crosssync-test-pack
38+
path: dist/ # this will pack automatically, so no other packs needed
39+
retention-days: 7

0 commit comments

Comments
 (0)