-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Publish Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
|
||
jobs: | ||
master: | ||
if: "startsWith(github.event.head_commit.message, '[Release]')" | ||
runs-on: ubuntu-22.04 | ||
name: Build and publish | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_AUTOMATION_TOKEN }} | ||
|
||
- name: Set input data | ||
id: input_data | ||
run: | | ||
if [[ ${{ github.ref }} == 'refs/heads/master' ]]; then | ||
echo "::set-output name=target::latest" | ||
else | ||
echo "::set-output name=target::beta" | ||
fi | ||
- name: Install dependencies and build | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
yarn install | ||
yarn publish:${{ steps.input_data.outputs.target }} | ||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
author_name: Github-Bot | ||
author_email: [email protected] | ||
message: 'Update data after publish:${{ steps.input_data.outputs.target }}' | ||
|
||
- 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. | ||
Commit message: ${{ github.event.head_commit.message }} |
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
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