-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from elsoul/backend
update package version/update github actions
- Loading branch information
Showing
10 changed files
with
1,226 additions
and
692 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,41 @@ | ||
name: SkeetFrameworkDiscord | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm i -g yarn | ||
- run: yarn install | ||
- name: Disord Notification Epics | ||
run: yarn discord epics ${{ github.repository }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} | ||
DISCORD_CHANNEL_ID: ${{ secrets.DISCORD_CHANNEL_ID }} | ||
DISCORD_CHANNEL_ID_JA: ${{ secrets.DISCORD_CHANNEL_ID_JA }} | ||
- name: Disord Notification LABO | ||
run: yarn discord labo ${{ github.repository }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DISCORD_TOKEN_LABO: ${{ secrets.DISCORD_TOKEN_LABO }} | ||
LABO_SKEET_CHANNEL_ID: ${{ secrets.LABO_SKEET_CHANNEL_ID }} | ||
- name: Post X package update notification | ||
if: success() | ||
run: | | ||
curl --location ${{ secrets.TW_ENDPOINT }} \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{"repo": "${{ github.repository }}", "hey": "${{ secrets.TW_ENDPOINT_SECRET }}"}' |
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,27 @@ | ||
import { discordChangeLog } from '@skeet-framework/discord-utils' | ||
import { dotenv } from '@skeet-framework/utils' | ||
dotenv.config() | ||
|
||
type ProjectType = 'labo' | 'epics' | ||
|
||
const run = async (project: ProjectType, repoName: string) => { | ||
if (project === 'labo') { | ||
console.log('labo') | ||
const token = process.env.DISCORD_TOKEN_LABO || '' | ||
const channelId = process.env.LABO_SKEET_CHANNEL_ID || '' | ||
await discordChangeLog(token, repoName, [channelId]) | ||
} else if (project === 'epics') { | ||
console.log('epics') | ||
const token = process.env.DISCORD_TOKEN || '' | ||
const channelId = process.env.DISCORD_CHANNEL_ID || '' | ||
const channelIdJA = process.env.DISCORD_CHANNEL_ID_JA || '' | ||
await discordChangeLog(token, repoName, [channelId]) | ||
await discordChangeLog(token, repoName, [channelIdJA], 'ja') | ||
} else { | ||
console.log('invalid project name') | ||
} | ||
} | ||
|
||
const project = process.argv[2] as ProjectType | ||
const repoArg = process.argv[3] || '' | ||
void run(project, repoArg) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { dotenv } from '@skeet-framework/utils' | ||
dotenv.config() | ||
|
||
const NODE_ENV = process.env.NODE_ENV || 'development' | ||
|
||
// Define Constants in one place | ||
// e.g. Discord Constants | ||
export const DISCORD_APPLICATION_ID = '' | ||
export const DISCORD_PUBKEY = '' | ||
export const DISCORD_GUILD_ID = '' | ||
|
||
export const config = { | ||
NODE_ENV, | ||
} |
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
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
Oops, something went wrong.