Merge branch 'develop' into wip/about #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
env: | |
NV: 16.x # node version | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
test: | |
name: Test the app | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js ${{ env.NV }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NV }} | |
- name: Install dependencies | |
run: npm install | |
- name: Run Unit Tests | |
run: npm run test-ci | |
build: | |
name: Build the app | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js ${{ env.NV }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NV }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build in prod mode | |
run: docker build . | |
release-please: | |
name: Prepare next release | |
runs-on: ubuntu-latest | |
# Automate releases with Conventional Commit Messages as Pull Requests are merged into "develop" branch | |
if: github.ref == 'refs/heads/develop' | |
steps: | |
- name: Get release please action | |
uses: GoogleCloudPlatform/release-please-action@v2 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
release-type: node | |
package-name: beol | |
changelog-types: '[ | |
{"type": "feat", "section": "Enhancements", "hidden": false }, | |
{"type": "fix", "section": "Bug Fixes", "hidden": false }, | |
{"type": "chore", "section": "Maintenance", "hidden": false }, | |
{"type": "refactor", "section": "Maintenance", "hidden": false }, | |
{"type": "docs", "section": "Documentation", "hidden": false } | |
]' | |
# publish only on release | |
publish: | |
name: Publish to Dockerhub | |
needs: [ | |
build, | |
test | |
] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- run: make publish-beol-image |