-
Notifications
You must be signed in to change notification settings - Fork 10
53 lines (46 loc) · 1.86 KB
/
pg-node-standalone-release.yml
File metadata and controls
53 lines (46 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: PgNode Standalone Release
on:
release:
types:
- published
workflow_dispatch:
jobs:
build-bundle:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch bundled node env template
run: |
set -euo pipefail
mkdir -p dist/pg-node-assets
curl -fsSL https://raw.githubusercontent.com/pasarguard/node/main/.env.example -o dist/pg-node-assets/.env.example
- name: Build standalone bundle
run: |
set -euo pipefail
BUNDLE_ROOT="dist/pg-node-standalone"
mkdir -p "$BUNDLE_ROOT/lib" "$BUNDLE_ROOT/iran-sanction" "$BUNDLE_ROOT/docker-compose" "$BUNDLE_ROOT/pg-node-assets"
cp pg-node.sh "$BUNDLE_ROOT/"
cp iran-sanction/pg-node-standalone.sh "$BUNDLE_ROOT/iran-sanction/"
cp lib/common.sh "$BUNDLE_ROOT/lib/"
cp lib/system.sh "$BUNDLE_ROOT/lib/"
cp lib/docker.sh "$BUNDLE_ROOT/lib/"
cp lib/github.sh "$BUNDLE_ROOT/lib/"
cp iran-sanction/mirror.sh "$BUNDLE_ROOT/iran-sanction/"
cp docker-compose/node.yml "$BUNDLE_ROOT/docker-compose/"
cp dist/pg-node-assets/.env.example "$BUNDLE_ROOT/pg-node-assets/.env.example"
cp iran-sanction/README-pg-node-standalone.fa.md "$BUNDLE_ROOT/README.md"
tar -czf dist/pg-node-standalone.tar.gz -C dist pg-node-standalone
- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: pg-node-standalone
path: dist/pg-node-standalone.tar.gz
- name: Upload release asset
if: github.event_name == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.event.release.tag_name }}" dist/pg-node-standalone.tar.gz --clobber