Skip to content

Publish Build

Publish Build #19

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
type: choice
options:
- 'latest'
- 'beta'
default: 'beta'
version:
description: 'Version'
required: true
default: ''
jobs:
master:
runs-on: ubuntu-22.04
name: Build and publish
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_AUTOMATION_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install
yarn set-version ${{ github.event.inputs.version }}
yarn publish:${{ github.event.inputs.release_type }}
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: Github-Bot
author_email: [email protected]
message: 'Release version ${{ github.event.inputs.version }}'
- name: Notify to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}
username: Chain List Notifier
title: ${{ github.workflow }}
description: |
The deployment has been completed.
Release ${{ github.event.inputs.release_type }} version ${{ github.event.inputs.version }}