-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chore) Minimal Github Actions workflow refactors (#91)
- Loading branch information
1 parent
c2b419a
commit cf5bc3e
Showing
2 changed files
with
36 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,11 @@ on: | |
types: | ||
- created | ||
|
||
env: | ||
TURBO_API: 'http://127.0.0.1:9080' | ||
TURBO_TOKEN: ${{ secrets.TURBO_SERVER_TOKEN }} | ||
TURBO_TEAM: ${{ github.repository_owner }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
@@ -21,7 +26,7 @@ jobs: | |
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Cache dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
|
@@ -30,7 +35,7 @@ jobs: | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
- name: Set yarn version | ||
run: yarn set version berry | ||
|
||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install | ||
|
@@ -40,16 +45,16 @@ jobs: | |
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
server-token: ${{ secrets.TURBO_SERVER_TOKEN }} | ||
|
||
- name: Run tests | ||
run: yarn run test | ||
|
||
- name: Run lint and typechecking | ||
run: yarn run verify | ||
run: yarn run verify | ||
|
||
- name: Run build | ||
run: yarn turbo run build --color --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}" | ||
run: yarn turbo run build --color" | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
|
@@ -73,10 +78,10 @@ jobs: | |
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v2 | ||
|
||
- name: Compute Timestamp | ||
run: echo "TIMESTAMP=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
- name: Prepare Directory | ||
shell: bash | ||
run: | | ||
|
@@ -99,10 +104,10 @@ jobs: | |
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v2 | ||
|
||
- name: Compute Timestamp | ||
run: echo "TIMESTAMP=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
- name: Prepare Directory | ||
shell: bash | ||
run: | | ||
|
@@ -124,14 +129,14 @@ jobs: | |
with: | ||
node-version: 18 | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Cache dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npx lerna bootstrap | ||
|
@@ -141,10 +146,10 @@ jobs: | |
|
||
- name: Patch | ||
run: yarn lerna version patch --no-git-tag-version --no-push --yes | ||
|
||
- name: Version | ||
run: npx lerna version "$(node -e "console.log(require('./lerna.json').version)")-pre.${{ github.run_number }}" --no-git-tag-version --yes | ||
|
||
- run: git config user.email "[email protected]" && git config user.name "KenyaEMR CI" | ||
- run: git add . && git commit -m "Prerelease version" --no-verify | ||
|
||
|
@@ -156,7 +161,7 @@ jobs: | |
shell: bash | ||
run: | | ||
ls -alh | ||
release: | ||
runs-on: ubuntu-latest | ||
|
@@ -172,21 +177,21 @@ jobs: | |
with: | ||
node-version: "16" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Cache dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npx lerna bootstrap | ||
|
||
- name: Build | ||
run: yarn turbo run build --color | ||
|
||
- name: Publish | ||
run: yarn run ci:publish | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters