-
Notifications
You must be signed in to change notification settings - Fork 39
46 lines (44 loc) · 1.14 KB
/
default.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Test and Release
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
schedule:
- cron: "0 4 * * 5" # every Friday 04:00
jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: |
yarn install
yarn global add sfdx-cli@7.172.0
- name: Run unit tests
run: yarn test
- name: Authenticate DevHub and create scratch org
env:
SFDX_AUTH_URL_DEVHUB: ${{ secrets.SFDX_AUTH_URL_DEVHUB }}
run: |
sfdx auth:sfdxurl:store -d -a devhub -f /dev/stdin <<< "${SFDX_AUTH_URL_DEVHUB}"
yarn develop
- name: Run end-to-end tests
run: yarn test:e2e
- name: Delete scratch org
if: always()
run: |
sfdx force:org:delete -p
- name: Release package
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}