K3s deployment (#126) #62
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: release | |
# Run the workflow when a Pull Request is opened or when changes are pushed to master | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
#paths: | |
# - "common/**" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Run the steps below with the following versions of Node.js | |
node-version: [18.x] | |
steps: | |
# Fetch the latest commit | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Setup Node.js using the appropriate version | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# Install package dependencies | |
- name: Install | |
run: yarn install --frozen-lockfile | |
# Build | |
- name: Build | |
run: yarn workspace common build | |
# Run tests | |
- name: Test | |
working-directory: common | |
run: yarn workspace common test | |
release: | |
# Only release on push to master | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Install | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn workspace common build | |
- name: Release | |
run: yarn exec multi-semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DOCKER_REGISTRY_USER: ${{ github. actor }} | |
DOCKER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |