Skip to content

Commit

Permalink
ci: add relase and deploy workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranroneill committed Feb 21, 2024
1 parent c3a9b38 commit 3b6a4a7
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 0 deletions.
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Deploy"

on:
release:
types: [released] # triggered on main branch releases

jobs:
install:
name: "Install"
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
uses: actions/checkout@v4
- name: "🔧 Setup"
uses: ./.github/actions/use-dependencies

deploy:
name: "Deploy"
needs: install
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
uses: actions/checkout@v4
- name: "🔧 Setup"
uses: ./.github/actions/use-dependencies
- name: "🏗️ Build"
run: yarn build
- name: "🚀 Deploy"
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.WRITE_REPOS_TOKEN }}
publish_branch: gh-pages
publish_dir: ./dist
user_name: agoralabs-bot
user_email: tech@agoralabs.sh
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Release"

on:
push:
branches:
- main

jobs:
release:
name: "Release"
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
uses: actions/checkout@v4
- name: "🔧 Setup"
uses: actions/setup-node@v4
with:
node-version: '20.9.0'
cache: yarn
- name: "📦 Install"
run: yarn global add semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/npm @semantic-release/github @semantic-release/git @semantic-release/changelog
- name: "🔖 Release"
env:
# appears on the release commits
GIT_AUTHOR_NAME: agoralabs-bot
GIT_AUTHOR_EMAIL: tech@agoralabs.sh
GIT_COMMITTER_NAME: agoralabs-bot
GIT_COMMITTER_EMAIL: tech@agoralabs.sh
# used to push the release commit and create the tags
GITHUB_TOKEN: ${{ secrets.WRITE_REPOS_TOKEN }}
run: semantic-release
22 changes: 22 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"branches": "main",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"releasedLabels": ["🚀 released"]
}
]
]
}
Binary file removed assets/logo.png
Binary file not shown.
Binary file added assets/logo@128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3b6a4a7

Please sign in to comment.