Skip to content

Commit

Permalink
Update actions (#304)
Browse files Browse the repository at this point in the history
* Update actions

* Format prettier

* Add cache for node

* Frozen lock file

* Frozen lock file
  • Loading branch information
petrvecera authored Apr 15, 2024
1 parent 6e68466 commit 976ac49
Show file tree
Hide file tree
Showing 9 changed files with 2,692 additions and 115 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- name: Setup Node
uses: actions/setup-node@master
with:
node-version: "16.x"
node-version: "20.x"
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules-v1
cache-name: cache-node-modules-v2
with:
path: |
node_modules
Expand All @@ -40,7 +40,7 @@ jobs:
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Install Deps
run: yarn install
run: yarn install --frozen-lockfile
- name: Fix the bug ISSUE 1078
run: yarn run "react-spring-issue-1078"
- name: Build the app
Expand All @@ -52,6 +52,5 @@ jobs:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_CI_PROD}}
# Something is wrong with firebase-tools in the CI
run: |
npm install -g firebase-tools
firebase use $FB_PROJECT --token $FIREBASE_TOKEN
firebase deploy --only $FB_HOSTING --token $FIREBASE_TOKEN -m "CI deploy ${{ steps.get_version.outputs.VERSION }}" --non-interactive
npx firebase use $FB_PROJECT --token $FIREBASE_TOKEN
npx firebase deploy --only $FB_HOSTING --token $FIREBASE_TOKEN -m "CI deploy ${{ steps.get_version.outputs.VERSION }}" --non-interactive
13 changes: 6 additions & 7 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- name: Setup Node
uses: actions/setup-node@master
with:
node-version: "16.x"
node-version: "20.x"
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules-v1
cache-name: cache-node-modules-v2
with:
path: |
node_modules
Expand All @@ -40,7 +40,7 @@ jobs:
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Install Deps
run: yarn install
run: yarn install --frozen-lockfile
- name: Fix the bug ISSUE 1078
run: yarn run "react-spring-issue-1078"
- name: Build the app
Expand All @@ -57,6 +57,5 @@ jobs:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_CI_PROD}}
# Something is wrong with firebase-tools in the CI
run: |
npm install -g firebase-tools
firebase use $FB_PROJECT --token $FIREBASE_TOKEN
firebase deploy --only $FB_HOSTING --token $FIREBASE_TOKEN -m "CI deploy ${{ steps.get_version.outputs.VERSION }}" --non-interactive
npx firebase use $FB_PROJECT --token $FIREBASE_TOKEN
npx firebase deploy --only $FB_HOSTING --token $FIREBASE_TOKEN -m "CI deploy ${{ steps.get_version.outputs.VERSION }}" --non-interactive
23 changes: 11 additions & 12 deletions .github/workflows/electron-build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,17 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "14.x"
# - name: Cache node modules
# uses: actions/cache@v3
# env:
# cache-name: cache-node-modules-v1
# with:
# path: |
# node_modules
# */*/node_modules
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-build-${{ env.cache-name }}-
node-version: "20.x"
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-desktop-app-modules-v1
with:
path: |
node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install dependencies
run: yarn install
- name: Build
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/electron-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,17 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "14.x"
# - name: Cache node modules
# uses: actions/cache@v3
# env:
# cache-name: cache-node-modules-v1
# with:
# path: |
# node_modules
# */*/node_modules
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-build-${{ env.cache-name }}-
node-version: "20.x"
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-desktop-app-modules-v1
with:
path: |
node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install dependencies
run: yarn install
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16.x"
node-version: "20.x"
cache: "yarn"
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules-v1
cache-name: cache-node-modules-v2
with:
path: |
node_modules
Expand All @@ -26,7 +26,7 @@ jobs:
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install Web Project
run: yarn install
run: yarn install --frozen-lockfile
- name: Check the code
run: |
yarn lint:prettier
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
[![DeepScan grade](https://deepscan.io/api/teams/15780/projects/20479/branches/558227/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=15780&pid=20479&bid=558227)
[![Discord](https://img.shields.io/discord/959118129240350740?style=flat&label=Chat%20on%20Discord)](https://discord.gg/jRrnwqMfkr)


### Website https://coh2stats.com/

With all the data, player cards, leaderboards, maps, stats, commanders, inte-bulletins and much more!
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-sonarjs": "^0.11.0",
"firebase-tools": "13.7.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.4.1",
"source-map-explorer": "^2.5.2",
Expand Down
Loading

0 comments on commit 976ac49

Please sign in to comment.