v0.1.9 #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} | |
| TAG: ${{ github.event.release.tag_name }} | |
| run: | | |
| gh release upload "$TAG" dist/pg-node-standalone.tar.gz --clobber |