-
-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9956a1
commit 1835370
Showing
3 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: NPM Publisher | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
tagged-release: | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
VERSION_TAG: ${{ steps.get_vars.outputs.VERSION_TAG }} | ||
steps: | ||
- name: Install archive tools | ||
run: sudo apt-get install zip gzip tar | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.ref }} | ||
- name: Get variables | ||
run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//} | ||
id: get_vars | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Run tests | ||
run: yarn test | ||
- name: Run build | ||
run: npm run build | ||
- name: Create Release | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: true | ||
files: | | ||
id: auto_release | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Tagged Release Publisher | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
jobs: | ||
create-tagged-release: | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
VERSION_TAG: v0.1.1-ci | ||
steps: | ||
- name: Install archive tools | ||
run: sudo apt-get install zip gzip tar | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.ref }} | ||
- name: Get variables | ||
run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//} | ||
id: get_vars | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Run tests | ||
run: yarn test | ||
- name: Run build | ||
run: npm run build | ||
- name: Bundle built files | ||
run: | | ||
mkdir npwd_temp | ||
mkdir npwd_temp/resources | ||
cp -t npwd_temp/resources -r resources/dist resources/html | ||
cp -t npwd_temp fxmanifest.lua config.json LICENSE README.md | ||
zip -r npwd-${{ steps.get_vars.outputs.VERSION_TAG }} npwd_temp | ||
rm -rf npwd_temp | ||
echo "Cleaned up" | ||
- name: Create Release | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
files: | | ||
npwd-${{ steps.get_vars.outputs.VERSION_TAG }} | ||
id: auto_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# No IDE Folders | ||
.idea | ||
|
||
npwd_temp | ||
|
||
resources/html | ||
|
||
phone/.eslintcache | ||
|