Skip to content

Commit

Permalink
feat: release v1
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver committed Aug 12, 2021
1 parent 3f96daa commit 5fa28e3
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,32 @@ name: ci
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
- 'main'
pull_request: {}

jobs:
build_test_release:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [12, 14, 16]
node-version: ${{ fromJSON(github.ref == 'refs/heads/main' && '[16]' || '[12,14,16]') }}
os: ${{ fromJSON(github.ref == 'refs/heads/main' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest"]') }}
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: install
run: npm install
- name: build
run: npm run build
- name: test
run: npm run test
# - name: Release
# if: github.repository == 'timdeschryver/ngrx-immer' && github.ref == 'refs/heads/main' && matrix.node-version == 16 && matrix.os == 'ubuntu-latest'
# run: npx semantic-release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run test -- --ci --coverage
- name: Release
if: github.repository == 'timdeschryver/ngrx-immer' && github.ref == 'refs/heads/main'
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 5fa28e3

Please sign in to comment.