Skip to content

Commit

Permalink
feat: update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sbstjn committed Feb 20, 2021
1 parent 7f3a99d commit 9240323
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 21 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Integration

on: [push]
on:
push:
branches:
- '*'
- '*/*'
- '**'
- '!main'

jobs:
build:
Expand Down Expand Up @@ -39,23 +45,3 @@ jobs:
- run: yarn

- run: yarn test
version:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs:
- build
- test
steps:
- uses: actions/checkout@v2

- uses: cycjimmy/semantic-release-action@v2
name: Semantic Release
timeout-minutes: 2
id: semantic
with:
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Integration

on:
push:
branches:
- 'main'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- uses: actions/setup-node@v2-beta
with:
node-version: '12'

- run: yarn

- run: yarn build
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- uses: actions/setup-node@v2-beta
with:
node-version: '12'

- run: yarn

- run: yarn test
version:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs:
- build
- test
steps:
- uses: actions/checkout@v2

- uses: cycjimmy/semantic-release-action@v2
name: Semantic Release
timeout-minutes: 2
id: semantic
with:
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"test": "jest",
"cdk": "cdk",
"deploy": "cdk deploy",
"format": "yarn prettier-format",
"prettier-format": "prettier --config .prettierrc 'aws/**/*.ts' --write",
"prettier-watch": "onchange 'aws/**/*.ts' -- prettier --write {{changed}}"
},
Expand Down

0 comments on commit 9240323

Please sign in to comment.