Skip to content

Commit

Permalink
ci: auto bump version from tag in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinocroustibat committed Aug 27, 2024
1 parent 104f3ed commit 59d9468
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@ on:
- "*"

jobs:

deploy-prod:

name: Deploy to prod from ${{ github.ref_name }}/${{ github.sha }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Checkout repo
uses: actions/checkout@v4

- name: Bump version in package.json
uses: ramonpaolo/bump-version@v2.3.1
with:
tag: ${{ github.ref_name }} # Accessing the context and get the reference_name, that in this case, is the created tag (ex: 1.0.0)
commit: true
branch_to_push: 'main'

- uses: oven-sh/setup-bun@v1
name: Install Bun
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ on:
- main

jobs:

deploy-staging:

name: Deploy to staging from ${{ github.ref_name }}/${{ github.sha }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Checkout repo
uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
name: Install Bun
Expand Down

0 comments on commit 59d9468

Please sign in to comment.