1919 - run : npm ci
2020 - run : npm run lint
2121 - run : npm run test:examples
22+ - run : npm pack
23+ - uses : actions/upload-artifact@v3
24+ with :
25+ if-no-files-found : error
26+ name : package
27+ path : codeyourfuture-eslint-config-standard-*.tgz
2228 install :
2329 runs-on : ubuntu-22.04
2430 needs : build
@@ -32,11 +38,31 @@ jobs:
3238 with :
3339 cache : ' npm'
3440 node-version : ${{ matrix.node }}
41+ - uses : actions/download-artifact@v3
42+ with :
43+ name : package
3544 - run : npm ci
3645 - run : npm run test:install
3746 env :
3847 ESLINT_VERSION : ${{ matrix.eslint }}
39- deploy :
48+ PACK : ' false'
49+ deploy-github :
50+ runs-on : ubuntu-22.04
51+ if : startsWith(github.ref, 'refs/tags/v')
52+ needs : install
53+ steps :
54+ - uses : actions/checkout@v3
55+ - uses : actions/download-artifact@v3
56+ with :
57+ name : package
58+ - run : |
59+ gh release create \
60+ '${{ github.ref_name }}' \
61+ --title '${{ github.ref_name }}' \
62+ codeyourfuture-eslint-config-standard-*.tgz
63+ env:
64+ GH_TOKEN: ${{ github.token }}
65+ deploy-npm :
4066 runs-on : ubuntu-22.04
4167 if : startsWith(github.ref, 'refs/tags/v')
4268 needs : install
4874 - run : npm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}"
4975 env :
5076 NPM_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
51- - run : npm pack
77+ - uses : actions/download-artifact@v3
78+ with :
79+ name : package
5280 - run : npm publish codeyourfuture-eslint-config-standard-*.tgz
53- - run : |
54- gh release create \
55- '${{ github.ref_name }}' \
56- --title '${{ github.ref_name }}' \
57- codeyourfuture-eslint-config-standard-*.tgz
58- env:
59- GH_TOKEN: ${{ github.token }}
0 commit comments