Skip to content

Commit 3eb48d9

Browse files
Merge pull request #1 from dv-net/test-ci
Add ci build for dv-merchant
2 parents af21488 + 32a4835 commit 3eb48d9

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
20+
- name: Install dependencies
21+
run: yarn install --frozen-lockfile
22+
23+
- name: Build
24+
run: |
25+
echo "VITE_API_URL=/api/v1" > .env
26+
echo "VITE_APP_VERSION=${GITHUB_REF_NAME} (${GITHUB_SHA::7})" >> .env
27+
yarn build-only
28+
29+
- name: Pack build
30+
run: |
31+
mkdir -p artifacts
32+
cd dist
33+
tar -czvf ../artifacts/dv-frontend.${GITHUB_REF_NAME}.tar.gz .
34+
35+
- name: Upload artifact
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: dv-frontend-${{ github.ref_name }}
39+
path: artifacts/dv-frontend.${{ github.ref_name }}.tar.gz
40+
41+
release:
42+
needs: build # ждем сборки
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Download artifact
46+
uses: actions/download-artifact@v4
47+
with:
48+
name: dv-frontend-${{ github.ref_name }}
49+
50+
- name: Create Release
51+
uses: softprops/action-gh-release@v2
52+
with:
53+
files: dv-frontend.${{ github.ref_name }}.tar.gz
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)