mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 22:16:54 +00:00
ci(pre-release): cleaned up pre-release ci slightly
This commit is contained in:
1 parent
1583789341
commit
95c3aea1d9
1 file changed
+19
-22
@@ -5,56 +5,53 @@ on:
|
||||
- ci-testing
|
||||
jobs:
|
||||
pre-release-build:
|
||||
name: 'Build & Create Pre-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: Setup Node and Yarn Cache
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'yarn'
|
||||
# Get zip util
|
||||
- name: Install archive tools
|
||||
run: sudo apt install zip
|
||||
|
||||
- name: Get variables
|
||||
id: get_vars
|
||||
run: |
|
||||
echo "::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//}"
|
||||
echo "::set-output name=SHORT_SHA::$(git rev-parse --short HEAD)"
|
||||
echo "::set-output name=DATE::$(date +'%D')"
|
||||
- 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
|
||||
|
||||
- name: Install Deps
|
||||
run: yarn --frozen-lockfile
|
||||
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
run: yarn build
|
||||
|
||||
- name: Bundle and Zip files
|
||||
run: |
|
||||
mkdir -p ./temp/npwd/resources
|
||||
cp ./{LICENSE,README.md,config.json,import.sql,fxmanifest.lua} ./temp/npwd/
|
||||
cp -r ./resources/{dist,html} ./temp/npwd/resources
|
||||
cd ./temp && zip -r npwd-pre-${{ steps.get_vars.outputs.SHORT_SHA }}.zip ./npwd
|
||||
|
||||
- name: Create Release & Changelog
|
||||
uses: "marvinpinto/action-automatic-releases@latest"
|
||||
uses: "marvinpinto/action-automatic-releases@v1.2.1"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
title: Pre-Release Build (${{ steps.get_vars.outputs.SHORT_SHA }}) | ${{ steps.get_vars.outputs.DATE }}
|
||||
prerelease: true
|
||||
automatic_release_tag: "unstable"
|
||||
files: ./temp/npwd-pre-${{ steps.get_vars.outputs.SHORT_SHA }}.zip
|
||||
|
||||
env:
|
||||
CI: false
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in new issue
Block a user