Merge pull request #145 from fensak-io/main #27
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: release | |
on: | |
push: | |
branches: | |
- release | |
jobs: | |
# Cut a release tag based on conventional-commits and semantic-release, and publish it. | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Auth as CI/CD bot | |
id: generate_token | |
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 | |
with: | |
app_id: ${{ secrets.FENSAK_CICD_BOT_APP_ID }} | |
private_key: ${{ secrets.FENSAK_CICD_BOT_PRIVATE_KEY }} | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.generate_token.outputs.token }} | |
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version: "lts/*" | |
- name: release | |
run: npx -y semantic-release@^22.0.5 | |
env: | |
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | |
# Deploy to prod environment. | |
deployprod: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # Needed to auth to Deno Deploy | |
checks: write # Needed for GHA to write the checks for the job | |
contents: read | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
with: | |
fetch-depth: 0 | |
- uses: denoland/deployctl@b841621a76eae438b09e1bce5e74549678c24e7f # v1.8.2 | |
with: | |
project: fensak | |
entrypoint: main.ts |