Skip to content

Commit

Permalink
3.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
karamem0 committed Nov 29, 2024
1 parent 78b73b5 commit 3802465
Show file tree
Hide file tree
Showing 108 changed files with 19,232 additions and 1,799 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
on:
workflow_call:
inputs:
environment:
required: true
type: string

jobs:
run:
name: Run
environment: ${{inputs.environment}}
runs-on: ubuntu-latest
steps:
- name: Checkout repos
uses: actions/checkout@v4
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Update .env
shell: pwsh
run: |
$content = Get-Content -Path ${{env.FILE_PATH}}
$content = $content -Replace "{{APP_CLIENT_ID}}", "${{vars.APP_CLIENT_ID}}"
$content = $content -Replace '{{APP_SERVER_ID}}', '${{vars.APP_SERVER_ID}}'
$content = $content -Replace "{{APP_TENANT_ID}}", "${{vars.APP_TENANT_ID}}"
$content = $content -Replace "{{TELEMETRY_CONNECTION_STRING}}", "${{vars.TELEMETRY_CONNECTION_STRING}}"
Out-File -FilePath ${{env.FILE_PATH}} -InputObject $content -Encoding UTF8
env:
FILE_PATH: source/client/.env
- name: Update package.json
run: npm version ${{vars.BUILD_VERSION}} --no-git-tag-version
working-directory: source/client
- name: Restore client
run: npm ci
working-directory: source/client
- name: Audit client
run: npm audit --omit=dev
working-directory: source/client
- name: Build client
run: npm run build
working-directory: source/client
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Restore server
run: dotnet restore
working-directory: source/server
- name: Build server
shell: pwsh
run: |
dotnet publish `
Karamem0.BookingsBot/Karamem0.BookingsBot.csproj `
-c Release `
-p:PublishDir=${{github.workspace}}/source/build `
-p:Version=${{vars.BUILD_VERSION}}.${{github.run_number}} `
-p:FileVersion=${{vars.BUILD_VERSION}}.${{github.run_number}}
working-directory: source/server
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build
path: source/build
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
workflow_call:
inputs:
environment:
required: true
type: string

jobs:
run:
name: Run
environment: ${{inputs.environment}}
runs-on: ubuntu-latest
steps:
- name: Download artifatcs
uses: actions/download-artifact@v4
with:
name: build
path: build
- name: Connect to Azure
uses: azure/login@v2
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: ${{vars.AZURE_APP_SERVICE_NAME}}
package: build
19 changes: 19 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
branches:
- develop

jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
secrets: inherit
with:
environment: dev
deploy:
name: Deploy
needs: build
uses: ./.github/workflows/deploy.yml
secrets: inherit
with:
environment: dev
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
branches:
- main

jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
secrets: inherit
with:
environment: prd
deploy:
name: Deploy
needs: build
uses: ./.github/workflows/deploy.yml
secrets: inherit
with:
environment: prd
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on: workflow_call

jobs:
run:
name: Run
runs-on: ubuntu-latest
steps:
- name: Create release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
10 changes: 10 additions & 0 deletions .github/workflows/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
on:
push:
tags:
- v*.*.*

jobs:
release:
name: Release
uses: ./.github/workflows/release.yml
secrets: inherit
91 changes: 0 additions & 91 deletions .github/workflows/workflow.deploy.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/workflow.release.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/workflow.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Microsoft Bookings Bot

[![.github/workflows/main.yml](https://github.com/karamem0/bookings-bot/actions/workflows/workflow.yml/badge.svg?branch=main)](https://github.com/karamem0/bookings-bot/actions/workflows/workflow.yml)
[![codecov](https://codecov.io/gh/karamem0/bookings-bot/graph/badge.svg?token=HJXEVPEAHV)](https://codecov.io/gh/karamem0/bookings-bot)
[![License](https://img.shields.io/github/license/karamem0/bookings-bot.svg)](https://github.com/karamem0/bookings-bot/blob/main/LICENSE)

[Microsoft Bookings API](https://learn.microsoft.com/ja-jp/graph/api/resources/booking-api-overview) を使用して [Microsoft Bookings](https://www.microsoft.com/ja-jp/microsoft-365/business/scheduling-and-booking-app) の予約をするボットです。
Loading

0 comments on commit 3802465

Please sign in to comment.