Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Commit 7be1a43

Browse files
committed
ci: move env to top
1 parent bf38a7b commit 7be1a43

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/build-and-release.yaml

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Build and Release
22

33
on: push
44

5+
env:
6+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7+
GRAPHQL_API_ENDPOINT: ${{ secrets.GRAPHQL_API_ENDPOINT }}
8+
GRAPHQL_API_KEY: ${{ secrets.GRAPHQL_API_KEY }}
9+
510
jobs:
611
main:
712
runs-on: ubuntu-latest
@@ -12,8 +17,7 @@ jobs:
1217
with:
1318
node-version: "12.x"
1419
- name: Authenticate with NPM
15-
env:
16-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
1721
run: |
1822
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" > ~/.npmrc
1923
- name: Keep npm cache around to speed up installs
@@ -33,15 +37,10 @@ jobs:
3337
cat .version
3438
- name: Build
3539
run: npm run build
36-
env:
37-
GRAPHQL_API_ENDPOINT: ${{ secrets.GRAPHQL_API_ENDPOINT }}
38-
GRAPHQL_API_KEY: ${{ secrets.GRAPHQL_API_KEY }}
3940
- name: Lint
4041
run: npm run lint
4142
- name: Publish latest release to GitHub pages
4243
if: contains(github.ref, 'saga')
43-
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4544
run: |
4645
echo "machine github.com login authtoken password ${GITHUB_TOKEN}" > ~/.netrc
4746
git config --global user.email "[email protected]"
@@ -55,8 +54,6 @@ jobs:
5554
git push -f origin HEAD:gh-pages
5655
- name: Semantic release
5756
continue-on-error: true
58-
env:
59-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6057
run: |
6158
npm i --no-save semantic-release
6259
npx semantic-release

0 commit comments

Comments
 (0)