Skip to content

Commit

Permalink
chore: test new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Forceh91 committed Oct 8, 2023
1 parent 60c2f60 commit f54e67a
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ on:
pull_request:
branches:
- master
- v2
paths:
- "**.js"
- "**.spec.js"
- "**.vue"
- "**.ts"
- "**.test.ts"
- "**.json"
- "**.yml"
- "yarn.lock"
push:
branches:
- master
- v2
paths:
- "**.js"
- "**.spec.js"
- "**.vue"
- "**.ts"
- "**.test.ts"
- "**.json"
- "**.yml"
- "yarn.lock"
Expand Down Expand Up @@ -52,6 +54,7 @@ jobs:
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
yarn install --force --non-interactive
unit-test:
name: "Unit Testing"
runs-on: ubuntu-latest
Expand All @@ -77,6 +80,7 @@ jobs:
- name: Run test
run: |
yarn test
build:
name: "Production Build"
runs-on: ubuntu-latest
Expand All @@ -101,31 +105,21 @@ jobs:
${{ runner.os }}-yarn-
- name: Run build
run: |
yarn build
yarn build:display
- name: Get build version
run: |
BUILD_VERSION=$(cat package.json|grep version|head -1|awk -F: '{ print $2 }'|sed 's/[", ]//g')
echo "build_version=v$BUILD_VERSION" >> $GITHUB_ENV
echo "commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
mkdir db
mkdir music
touch alerts/.EMPTY_DIRECTORY
touch cfg/.EMPTY_DIRECTORY
touch db/.EMPTY_DIRECTORY
touch music/.EMPTY_DIRECTORY
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.build_version }}-${{ env.commit_hash }}
path: |
dist
alerts
cfg
db
music
config
package.json
yarn.lock
README.md
*.js
*.ts
retention-days: 1

0 comments on commit f54e67a

Please sign in to comment.