Skip to content

Commit

Permalink
feat: cd initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveVodrazka committed Jun 20, 2024
1 parent 8d79f4e commit 7911c5f
Show file tree
Hide file tree
Showing 4 changed files with 28,593 additions and 19,323 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release

on:
push:
branches:
- continuous-deployment

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release

- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: YOUR_PROJECT_ID
service_account_key: ${{ secrets.GCP_SA_KEY }}

- name: Configure Docker to use gcloud as a credential helper
run: |
gcloud auth configure-docker us-central1-docker.pkg.dev
- name: Build Docker image
id: build
run: |
VERSION=$(npx -c 'echo $npm_package_version')
echo "VERSION=$VERSION" >> $GITHUB_ENV
docker build -t europe-west1-docker.pkg.dev/carmine-api-381920/docker-repository/app-mainnet:$VERSION .
- name: Push Docker image
run: |
docker push europe-west1-docker.pkg.dev/carmine-api-381920/docker-repository/app-mainnet:${{ env.VERSION }}
21 changes: 21 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"branches": [
"continuous-deployment"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"package.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
Loading

0 comments on commit 7911c5f

Please sign in to comment.