Skip to content

Commit

Permalink
ci: combine
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Aug 13, 2023
1 parent dbc1927 commit 6eec12b
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 62 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on: [push, workflow_dispatch]

env:
NODE_OPTIONS: --max-old-space-size=3200
CC_TEST_REPORTER_ID: 8263f3329c9a25abc9ad21473a65deabd4c8f0cd54db6e7fbba1a85fb6e5b829

jobs:
build-job:
runs-on: ubuntu-latest
steps:
- { uses: actions/checkout@v3, with: { persist-credentials: false } }
- { uses: actions/setup-node@v3, with: { node-version: 18, cache: 'yarn' } }
- run: yarn --frozen-lockfile --prefer-offline
- run: yarn build
- name: test
run: |
curl -s -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter
./cc-test-reporter before-build
yarn test
./cc-test-reporter after-build -t lcov
release-job:
runs-on: ubuntu-latest
if: github.base_ref == 'master'
permissions:
contents: write
id-token: write
steps:
- { uses: actions/checkout@v3, with: { persist-credentials: true } }
- { uses: actions/setup-node@v3, with: { node-version: 18, cache: 'yarn' } }

# Cache for npm/npx in ~/.npm
- uses: actions/cache@v3
with:
path: ~/.npm
key: npm-v1-${{ runner.os }}

- run: yarn --frozen-lockfile --prefer-offline
- run: yarn build-prod

- name: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx @naturalcycles/semantic-release
27 changes: 0 additions & 27 deletions .github/workflows/default.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 6eec12b

Please sign in to comment.