Skip to content

Commit

Permalink
♻️ Use semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaHuhn committed Jan 1, 2021
1 parent 09c89b7 commit 6c4cc21
Show file tree
Hide file tree
Showing 16 changed files with 6,877 additions and 148 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@betahuhn/config').eslint
5 changes: 2 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
target-branch: "develop"
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"
35 changes: 35 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Merge PRs
on:
pull_request:
types:
- labeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- name: Automerge
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GH_PAT }}"
MERGE_LABELS: "merge,!work in progress,!wip"
MERGE_REMOVE_LABELS: "merge"
MERGE_METHOD: "merge"
MERGE_COMMIT_MESSAGE: ":twisted_rightwards_arrows: Merge #{pullRequest.number} ({pullRequest.title})"
MERGE_FORKS: false
UPDATE_LABELS: "merge"
UPDATE_METHOD: "merge"
- name: Delete merged branch
uses: koj-co/delete-merged-action@master
with:
branches: "!master, !production, *"
env:
GITHUB_TOKEN: "${{ secrets.GH_PAT }}"
25 changes: 0 additions & 25 deletions .github/workflows/cdn.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Dependabot PR CI
on:
pull_request:
workflow_dispatch:
jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- name: Merge minor/patch updates
uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor
github-token: ${{ secrets.GH_PAT }}
56 changes: 56 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy CI
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
name: Build files
runs-on: ubuntu-18.04
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GH_PAT }}
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 14
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: Build TypeScript
run: npm run build
- name: Commit build
uses: stefanzweifel/[email protected]
with:
commit_message: ":rocket: Deploy new version [skip ci]"
commit_user_name: BetaHuhn Bot
commit_user_email: [email protected]
commit_author: BetaHuhn Bot <[email protected]>
upload:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: BetaHuhn/do-spaces-action@master
with:
access_key: ${{ secrets.ACCESS_KEY}}
secret_key: ${{ secrets.SECRET_KEY }}
space_name: ${{ secrets.SPACE_NAME }}
space_region: ${{ secrets.SPACE_REGION }}
source: "dist/drkmd-js.min.js"
out_dir: "dist/drkmd-js"
versioning: true
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint CI
on:
push:
branches-ignore:
- master
pull_request:
branches-ignore:
- master
jobs:
lint:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-npm-cache@v1
- name: Install dependencies
run: npm ci
- name: Run lint command
run: npm run lint
18 changes: 0 additions & 18 deletions .github/workflows/publish.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/release-scheduler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Release Scheduler CI
on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
jobs:
releaseScheduler:
runs-on: ubuntu-latest
steps:
- name: Run release-scheduler
uses: koj-co/release-scheduler@master
env:
GH_PAT: ${{ secrets.GH_PAT }}
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release CI
on:
push:
branches:
- master
jobs:
release:
name: Build and release
runs-on: ubuntu-18.04
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 14
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: Build TypeScript
run: npm run build
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_AUTHOR_NAME: "BetaHuhn Bot"
GIT_AUTHOR_EMAIL: "[email protected]"
GIT_COMMITTER_NAME: "BetaHuhn Bot"
GIT_COMMITTER_EMAIL: "[email protected]"
19 changes: 19 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Stale Issues CI"
on:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GH_PAT }}
stale-issue-message: "⚠️ This issue has not seen any activity in the past 2 months so I'm marking it as stale. I'll close it if it doesn't see any activity in the coming week."
stale-pr-message: "⚠️ This PR has not seen any activity in the past 2 months so I'm marking it as stale. I'll close it if it doesn't see any activity in the coming week."
days-before-stale: 60
days-before-close: 7
stale-issue-label: "wontfix"
exempt-issue-labels: "wip"
stale-pr-label: "wontfix"
exempt-pr-labels: "wip"
14 changes: 11 additions & 3 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
name: Build
on: [push, pull_request]
name: Test CI
on:
push:
branches-ignore:
- master
pull_request:
branches-ignore:
- master
jobs:
build:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
Expand Down
6 changes: 0 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.2.8] - 2020-12-29
### Changed
- update dependencies
Expand Down
Loading

0 comments on commit 6c4cc21

Please sign in to comment.