Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/ts-jest-26.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nblagoev committed Mar 17, 2021
2 parents 875f679 + 4d80caf commit 0846191
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 68 deletions.
48 changes: 25 additions & 23 deletions .github/workflows/build-pr.yml
Expand Up @@ -10,26 +10,28 @@ jobs:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install and build
run: |
yarn install --frozen-lockfile
yarn run coverage
yarn run build
env:
CI: true
- run: ./node_modules/.bin/codecov -f coverage/*.json
- name: Save PR number
if: ${{ github.actor == 'dependabot[bot]' }}
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/number
- uses: actions/upload-artifact@v2
if: ${{ github.actor == 'dependabot[bot]' }}
with:
name: pr
path: pr/
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install and build
run: |
yarn install --frozen-lockfile
yarn run coverage
yarn run build
env:
CI: true
- run: ./node_modules/.bin/codecov -f coverage/*.json
save-pr:
runs-on: ubuntu-latest
steps:
- name: Save PR number
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/number
- uses: actions/upload-artifact@v2
with:
name: pr
path: pr/
26 changes: 13 additions & 13 deletions .github/workflows/build.yml
Expand Up @@ -12,16 +12,16 @@ jobs:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install and build
run: |
yarn install --frozen-lockfile
yarn run coverage
yarn run build
env:
CI: true
- run: ./node_modules/.bin/codecov -f coverage/*.json
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install and build
run: |
yarn install --frozen-lockfile
yarn run coverage
yarn run build
env:
CI: true
- run: ./node_modules/.bin/codecov -f coverage/*.json
14 changes: 12 additions & 2 deletions .github/workflows/dependabot-pr.yml
Expand Up @@ -32,8 +32,10 @@ jobs:
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- run: unzip pr.zip
- name: Approve PR

- name: Approve and Merge PR
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -48,4 +50,12 @@ jobs:
pull_number: pr_number,
event: "APPROVE"
})
core.debug(`Approved pull request #${pr.number}`)
core.debug(`Approved pull request #${pr_number}`)
core.debug(`Merging pull request #${pr_number}`)
await github.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr_number,
})
core.debug(`Merged pull request #${pr_number}`)
24 changes: 12 additions & 12 deletions .github/workflows/draft-release.yml
Expand Up @@ -60,20 +60,20 @@ jobs:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: install and build
run: |
yarn install --frozen-lockfile
yarn run coverage
yarn run build
env:
CI: true
- name: install and build
run: |
yarn install --frozen-lockfile
yarn run coverage
yarn run build
env:
CI: true

release:
name: Create release
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/publish.yml
Expand Up @@ -7,26 +7,26 @@ jobs:
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-ghp:
name: Publish to GitHub Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
- run: yarn install --frozen-lockfile
- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
- run: yarn install --frozen-lockfile
- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0846191

Please sign in to comment.