Merge pull request #83 from amitsingh-007/dependabot-updates #4
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: Deploy CI | |
on: | |
push: | |
branches: | |
- "main" | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
Deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Start deployment | |
uses: bobheadxi/[email protected] | |
id: deployment | |
with: | |
step: start | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: Production | |
- name: Deploy (Vercel) | |
uses: amondnet/vercel-action@v25 | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} | |
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} | |
vercel-args: "--prod" | |
- name: Finish deployment | |
uses: bobheadxi/[email protected] | |
if: always() | |
with: | |
step: finish | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: ${{ job.status }} | |
deployment_id: ${{ steps.deployment.outputs.deployment_id }} | |
env_url: ${{ steps.vercel-action.outputs.preview-url }} | |
env: ${{ steps.deployment.outputs.env }} | |
Create_Release: | |
runs-on: ubuntu-latest | |
needs: [Deploy] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Generate Release Tag | |
id: release_tag | |
uses: amitsingh-007/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
tag_prefix: "v" | |
tag_template: "yy.mm.i" | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Release ${{ steps.release_tag.outputs.next_release_tag }} | |
tag_name: ${{ steps.release_tag.outputs.next_release_tag }} | |
token: ${{secrets.GITHUB_TOKEN}} | |
generate_release_notes: true |