Bump ws from 8.16.0 to 8.17.1 (#155) #195
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
on: push | |
name: CI | |
jobs: | |
build: | |
name: Build | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [ 18.x ] | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
run: pnpm install | |
- name: Package release archive | |
run: pnpm run package | |
- name: Save release archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-archive-${{ matrix.os }} | |
path: build/*.zip | |
build-and-push-image: | |
name: Build and push image | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: ${{ startsWith(github.ref, 'refs/tags/') }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
publish-release: | |
name: Publish release | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Set up Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'pnpm' | |
- name: Publish to npm | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
run: npm publish --access public | |
- name: Fetch release archives | |
uses: actions/download-artifact@v4 | |
- name: Get the tag name | |
id: tag | |
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//} | |
- name: Create github release | |
uses: felixbrucker/github-actions/publish-release@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: --name Chia-Dashboard-Satellite | |
- uses: AButler/[email protected] | |
with: | |
files: 'release-archive-*/*.zip' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
release-tag: ${{ steps.tag.outputs.TAG }} |