Skip to content

Commit

Permalink
ci: create github release on version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Sep 16, 2021
1 parent b4283f6 commit ba2bc57
Show file tree
Hide file tree
Showing 3 changed files with 559 additions and 50 deletions.
44 changes: 14 additions & 30 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,22 @@
name: Main
name: Build

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Use Node.js 14.x
uses: actions/setup-node@v2.2.0
with:
node-version: 14.x
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install
run: yarn install

- name: Lint
run: yarn run lint

- name: Check Formatting
run: git diff --exit-code

- name: Build
run: yarn run build

- name: Test
run: yarn run test

- name: Publish NPM
if: startsWith(github.ref, 'refs/tags/v')
run: npx lerna publish from-git --yes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN_LINZJS}}
- uses: linz/action-typescript@v1

- name: Create github release
if: startsWith(github.ref, 'refs/tags/v')
run: npx conventional-github-releaser -p angular
env:
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Publish to NPM
if: startsWith(github.ref, 'refs/tags/v')
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN_LINZJS}}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"repository": {
"type": "git",
"url": "https://github.com/linz/cotar.git"
},
"author": {
},
"author": {
"name": "Land Information New Zealand",
"url": "https://linz.govt.nz",
"organization": true
},
},
"private": true,
"keywords": [],
"type": "module",
Expand All @@ -29,6 +29,7 @@
"devDependencies": {
"@linzjs/style": "^3.0.0",
"@types/ospec": "^4.0.2",
"conventional-github-releaser": "^3.1.5",
"lerna": "^4.0.0",
"ospec": "^4.0.0",
"rimraf": "^3.0.0"
Expand Down
Loading

0 comments on commit ba2bc57

Please sign in to comment.