Skip to content

Commit

Permalink
feat: Implement release automation and versioning (#32)
Browse files Browse the repository at this point in the history
* Update package.json with new project name and version

* Update Node.js version to 21 in release workflow

* fix: Update .releaserc configuration

* Update .releaserc file

* fix: Update .releaserc file

* fix: Add assets to release configuration

* fix: Update .releaserc with branch configuration

* fix: Remove unnecessary branch from .releaserc

* fix: Remove unnecessary branch from release workflow
  • Loading branch information
irensaltali authored Feb 6, 2024
1 parent 83ab7f8 commit 551c4ea
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./worker
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '21'

- name: Install Dependencies
run: npm install

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
22 changes: 22 additions & 0 deletions worker/.releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"branches": [
{"name": "main", "prerelease": false}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"assets": [
{"path": "src/*"},
{"path": "*.ts"},
{"path": "package*"},
{"path": "wrangler.toml"}
],
"addReleases": "bottom",
"successComment": false
}
]
]
}
4 changes: 2 additions & 2 deletions worker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "worker2",
"version": "0.0.0",
"name": "serverless-api-gateway",
"version": "0.0.2",
"private": true,
"scripts": {
"deploy": "wrangler deploy",
Expand Down

0 comments on commit 551c4ea

Please sign in to comment.