Author SHA1 Message Date
Taso 9b273e2310 fix(ci/cd): Actual final wow 2021-04-01 14:12:37 -04:00
Taso ebbefd1497 fix(ci/cd): Final fix probably, maybe 2021-04-01 14:12:37 -04:00
Taso f0bb41ac5f fix(ci/cd): Github yaml syntax sucks 2021-04-01 14:12:37 -04:00
Taso eaa0c97cde tweaks(ci-cd): Build release changes 2021-04-01 14:12:37 -04:00
Taso c678ab101e Revert "tweak(phone/sentry): enable only in prod"
This reverts commit 1282ba7d40e691a2dd8542c42f6049707bc7e975.
2021-04-01 14:12:37 -04:00
Taso c46c75ebee feat(ci/cd): Automatically create a release on tag change 2021-04-01 14:12:37 -04:00
2 changed files with 60 additions and 2 deletions

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
---
name: "Deploy New Release"
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
branches:
- ci-cd/build-release
jobs:
deploy-release:
runs-on: "ubuntu-latest"
steps:
- name: Checkout Source
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set Env
id: commit_info
run: |
echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Find Yarn Cache Dir
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: Install deps for NUI & Game Scripts
run: |
cd phone && yarn --frozen-lockfile
cd ../resources && yarn --frozen-lockfile
- name: Testing NUI & Game Scripts
run: |
cd phone && yarn test
cd ../resources && yarn test
- name: Webpack/build NUI and Game Scripts
run: |
cd resources && yarn build
cd ../phone && yarn build
- name: Compressing built files
run: tar -czf npwd-${{env.SOURCE_TAG}}.tar.gz resources/dist/ resources/html/ fxmanifest.lua config.json LICENSE
- name: Create and deploy GitHub release
if: ${{ !env.ACT }}
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: '${{env.SOURCE_TAG}}'
prerelease: false
title: '${{ env.SOURCE_TAG }} - New Phone Who Dis'
files: npwd-${{env.SOURCE_TAG}}.tar.gz
+2 -2
View File
@@ -16,8 +16,8 @@ import updateLocale from 'dayjs/plugin/updateLocale';
dayjs.extend(relativeTime);
dayjs.extend(updateLocale);
// Enable Sentry when config setting is true and when in prod
if (PhoneConfig.SentryErrorMetrics && process.env.NODE_ENV !== 'development') {
// Enable Sentry when config setting is true
if (PhoneConfig.SentryErrorMetrics) {
Sentry.init({
dsn: 'https://[email protected]/5581619',
autoSessionTracking: true,