Skip to content

Commit

Permalink
feat: run semantic-release on Ci
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdovhan committed Feb 2, 2021
1 parent 22ef139 commit c13cb7b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Test build
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Build
run: |
npm install
npm run lint
npm run build
22 changes: 10 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
name: Release
on:
release:
types: [published]
push:
branches:
- main
jobs:
release:
name: Prepare release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
# Build
- name: Build the file
run: |
cd /home/runner/work/vacuum-card/vacuum-card
npm install
npm run lint
npm run build
# Upload build file to the release as an asset
- name: Upload zip to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/vacuum-card/vacuum-card/dist/vacuum-card.js
asset_name: vacuum-card.js
tag: ${{ github.ref }}
overwrite: true
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit c13cb7b

Please sign in to comment.