MorveN11 #5
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
name: CI/CD_PUSH_MAIN_RELEASE | |
run-name: ${{ github.actor }} | |
on: | |
push: | |
branches: | |
- 'main' | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
jobs: | |
release: | |
name: Create Release | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
pnpm_version: [9] | |
node_version: [20] | |
dotnet_version: [9.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Get the last commit | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet_version }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: ${{ matrix.pnpm_version }} | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node_version }} | |
cache: 'pnpm' | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Restore | |
run: pnpm restore | |
- name: Build | |
run: pnpm build | |
- name: Publish | |
run: pnpm run publish | |
- name: Ef Core Install | |
run: pnpm ef:install | |
- name: Ef Core Bundle | |
run: pnpm ef:bundle | |
# TODO: If you are going to Deploy your API, you can run the migrations here for your production database | |
# Only you need to add the connection string to your secrets | |
# - name: Run EF Migrations | |
# run: ./efbundle --connection "${{ secrets.DB_CONNECTION_STRING }}" | |
- name: Create Release | |
run: pnpm exec semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |