Skip to content

Commit 994df9e

Browse files
authored
Merge pull request #116 from launchcodedev/pkg
Adds standalone binary usage through `pkg`
2 parents ad4eb03 + 597590c commit 994df9e

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/pkg.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: pkg
2+
3+
on:
4+
push:
5+
tags: '*'
6+
7+
jobs:
8+
create-pkg:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest]
14+
node-version: [14.x]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- uses: bahmutov/npm-install@v1
22+
23+
- run: yarn build
24+
working-directory: ./app-config-main
25+
26+
- run: npx pkg . --out-path ./pkg -t node14-linux-x64,node14-macos-x64
27+
working-directory: ./app-config-main
28+
29+
- uses: actions/upload-artifact@v2
30+
with:
31+
name: release
32+
path: app-config-main/pkg/*
33+
34+
- uses: olegtarasov/[email protected]
35+
id: tagName
36+
37+
- id: create_release
38+
uses: actions/create-release@v1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
tag_name: ${{ github.ref }}
43+
release_name: Release ${{ steps.tagName.outputs.tag }}
44+
draft: false
45+
prerelease: false
46+
body: |
47+
See our [changelog](https://app-config.dev/release-notes.html) for release notes.
48+
49+
Single-binary executables are available in the assets below.
50+
51+
The packages are also available via NPM.
52+
53+
```
54+
npm i @app-config/main@${{ steps.tagName.outputs.tag }}
55+
```
56+
57+
Or, if you prefer, via Docker.
58+
59+
```
60+
docker run --rm -it -v $(realpath .):/mnt ghcr.io/launchcodedev/app-config:${{ steps.tagName.outputs.tag }} -C /mnt v
61+
```
62+
63+
- uses: actions/upload-release-asset@v1
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
with:
67+
upload_url: ${{ steps.create_release.outputs.upload_url }}
68+
asset_path: ./app-config-main/pkg/main-linux
69+
asset_name: app-config-linux
70+
asset_content_type: application/octet-stream
71+
72+
- uses: actions/upload-release-asset@v1
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
with:
76+
upload_url: ${{ steps.create_release.outputs.upload_url }}
77+
asset_path: ./app-config-main/pkg/main-macos
78+
asset_name: app-config-macos
79+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)