Skip to content

Commit

Permalink
ci: add push workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin committed Feb 21, 2022
1 parent 27ff130 commit d3087f2
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Push

on: push

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master

commitlint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Lint Commit
uses: wagoid/commitlint-github-action@v3

release:
name: Publish new release
needs: [lint, commitlint]
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
16 changes: 16 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"successComment": false,
"releasedLabels": false
}
]
]
}

0 comments on commit d3087f2

Please sign in to comment.