Skip to content

Commit

Permalink
chore: add github workflows and dependabot config
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Dec 12, 2024
1 parent 85c178b commit d37336f
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: monthly
groups:
safe-dependencies:
update-types: ['minor', 'patch']
major-dependencies:
update-types: ['major']
commit-message:
prefix: deps
prefix-development: deps(dev)
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
ci-dependencies:
dependency-type: 'production'
35 changes: 35 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Pull Request Events

on: pull_request

permissions:
contents: write
id-token: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test-check:
name: Lint
runs-on: ubuntu-latest

steps:
- name: ⬇️ Set up code
uses: actions/checkout@v4
with:
show-progress: false

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm

- name: 📥 Download dependencies
run: pnpm i

- name: 🧶 Lint
run: pnpm run lint
31 changes: 31 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Push Events

on:
push:
branches:
- dev
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release-please:
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: 🚀 Create Release
id: release-please
uses: agrc/release-composite-action@v1
with:
prerelease: ${{ github.ref_name == 'dev' }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
github-app-id: ${{ secrets.UGRC_RELEASE_BOT_APP_ID }}
github-app-key: ${{ secrets.UGRC_RELEASE_BOT_APP_KEY }}
github-app-name: ${{ secrets.UGRC_RELEASE_BOT_NAME }}
github-app-email: ${{ secrets.UGRC_RELEASE_BOT_EMAIL }}
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release Events

on:
release:
types: [published]

permissions:
id-token: write
deployments: write

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

steps:
- name: ⬇️ Set up code
uses: actions/checkout@v4
with:
show-progress: false

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*

- name: 📥 Download dependencies
run: pnpm i

- name: 🚢 Deploy to NPM as 'latest'
if: github.event.release.prerelease == false
run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: 🚢 Deploy to NPM as 'beta'
if: github.event.release.prerelease == true
run: pnpm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

notify:
name: Notifications
needs: deploy
if: github.event.release.prerelease == false
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write

steps:
- name: Release Notifier
uses: agrc/release-issue-notifications-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d37336f

Please sign in to comment.