Files
new-phone-who-dis/.github/workflows/release.yml
T
Workflow config file is invalid. Please check your config file: yaml: construct errors: line 2: (Line: 58, Col: 34): Unrecognized named-value: 'SOURCE_TAG'. Located at position 1 within expression: SOURCE_TAG (Line: 60, Col: 18): Unrecognized named-value: 'SOURCE_TAG'. Located at position 1 within expression: SOURCE_TAG

62 lines
2.0 KiB
YAML

---
name: "Deploy New Release"
on:
push:
tags:
- "v*"
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 ::set-output name=tag::${GITHUB_REF#refs/tags/}
echo Deploying Version: $SOURCE_TAG
env:
SOURCE_TAG: ${{ steps.commit_info.outputs.tag }}
- 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-$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: 'Release ${{SOURCE_TAG}}'
prerelease: false
title: 'v${{ SOURCE_TAG }} - New Phone Who Dis'
files: npwd-$SOURCE_TAG.tar.gz