⬆️ Bump tough-cookie from 4.0.0 to 4.1.3 #110
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
name: main | |
on: [push] | |
jobs: | |
test-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
cache: yarn | |
node-version: 12 | |
- run: yarn install --frozen-lockfile | |
- run: yarn type | |
- run: yarn lint | |
- run: yarn test --ci | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.MY_GITHUB_ACCESS_TOKEN }} | |
- name: test help command | |
run: yarn dev help | |
- name: test list command | |
run: yarn dev list | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.MY_GITHUB_ACCESS_TOKEN }} | |
- name: generate a .env.test with a random XXX_TEST value | |
run: | | |
export XXX_TEST=xxxtest$RANDOM | |
echo "XXX_TEST=$XXX_TEST" >> .env.test | |
cat .env.test | |
- name: test upload command, please manually run the "print-secret" action to confirm XXX_TEST was set | |
run: | | |
# the command should not read this env var, only the content of the .env file | |
export XXX_TEST=leak | |
yarn dev upload -e ./.env.test | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.MY_GITHUB_ACCESS_TOKEN }} | |
- run: yarn build | |
- run: npm pack; mv github-secret-dotenv-*.tgz github-secret-dotenv.tgz | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: env-test | |
path: .env.test | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: package | |
path: github-secret-dotenv.tgz | |
test-package: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
node: [12] | |
runs-on: ${{ matrix.os }} | |
needs: test-and-build | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: package | |
- uses: actions/setup-node@v1.4.4 | |
with: | |
node-version: ${{ matrix.node }} | |
- run: npm install ./github-secret-dotenv.tgz | |
- run: npx --no-install github-secret-dotenv list --repository platane/github-secret-dotenv | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.MY_GITHUB_ACCESS_TOKEN }} | |
publish-npm: | |
runs-on: ubuntu-latest | |
needs: test-package | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: package | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 12 | |
- name: npm publish | |
run: | | |
export NEW_VERSION=$(tar -zxvOf ./github-secret-dotenv.tgz package/package.json | grep '"version"' | cut -d'"' -f4) | |
export NPM_VERSION=$(npm info github-secret-dotenv version) | |
echo $NEW_VERSION - $NPM_VERSION | |
if [ "$NEW_VERSION" != "$NPM_VERSION" ]; then | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | |
npm publish ./github-secret-dotenv.tgz | |
fi | |
if: success() && github.ref == 'refs/heads/master' | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |