3.0.0-alpha.0 #31
Workflow file for this run
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: Publish | |
on: | |
workflow_run: | |
workflows: ["Node.js CI test"] | |
types: | |
- completed | |
push: | |
tags: | |
- "v*" | |
jobs: | |
Publish: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: "npm" | |
registry-url: https://registry.npmjs.org | |
cache-dependency-path: package-lock.json | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Publish package | |
run: npm publish | |
- name: Build package | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ruby-dev build-essential rpm | |
sudo gem install fpm | |
sudo scripts/build-packages | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "*.deb,*.rpm" | |
name: ${{ github.ref_name }} | |
tag: ${{ github.ref }} | |
Deploy_Docker_Image: | |
runs-on: ubuntu-latest | |
needs: Publish | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: "npm" | |
registry-url: https://registry.npmjs.org | |
cache-dependency-path: package-lock.json | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
- name: Build and Deploy Docker Image | |
run: | | |
sudo docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
sudo scripts/deploy-docker | |
sudo docker logout |