Skip to content

Commit

Permalink
Merge pull request #10 from upsetjs/release/v3.1.0
Browse files Browse the repository at this point in the history
Release v3.1.0
  • Loading branch information
sgratzl committed Nov 5, 2021
2 parents c2ebf09 + 18c058a commit 5726afd
Show file tree
Hide file tree
Showing 23 changed files with 4,499 additions and 6,013 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ const pkg = require('./package.json');
module.exports = {
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'airbnb-typescript',
'react-app',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier/@typescript-eslint',
'prettier',
],
parserOptions: {
project: './tsconfig.eslint.json',
},
settings: {
react: {
version: pkg.devDependencies.react ? 'detect' : '99.99.99',
Expand Down
22 changes: 22 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'enhancement'
- 'feature'
- title: '🐛 Bugs Fixes'
labels:
- 'bug'
- title: 'Documentation'
labels:
- 'documentation'
- title: '🧰 Development'
labels:
- 'chore'
change-template: '- #$NUMBER $TITLE'
change-title-escapes: '\<*_&`#@'
template: |
$CHANGES
Thanks to $CONTRIBUTORS
21 changes: 7 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.1.2
- uses: actions/setup-node@v2
with:
node-version: '12.x'
node-version: 14
- run: npm i -g yarn
- run: yarn set version berry
- run: cat .yarnrc_patch.yml >> .yarnrc.yml
- run: yarn config set checksumBehavior ignore
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ./.yarn
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock') }}
path: |
./.yarn/cache
./.yarn/unplugged
key: ${{ runner.os }}-yarn2-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2-
${{ runner.os }}-yarn2-v4
- run: yarn install
- run: yarn build
- run: yarn lint
- run: yarn test:coverage
- run: yarn docs
# - name: Deploy
# if: github.ref == 'refs/heads/master' && github.event_name == 'push'
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs
# enable_jekyll: false
37 changes: 37 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Create Release
on:
workflow_dispatch:
inputs:
versionName:
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major, prepatch, preminor, premajor, prerelease)'
required: true
default: patch
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
ref: main
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
- name: Reset main branch
run: |
git fetch origin dev:dev
git reset --hard origin/dev
- name: Change version number
id: version
run: |
echo -n "::set-output name=next_tag::"
npm version --no-git-tag-version ${{ github.event.inputs.versionName }}
- name: Create pull request into main
uses: peter-evans/create-pull-request@v3
with:
branch: release/${{ steps.version.outputs.next_tag }}
commit-message: 'chore: release ${{ steps.version.outputs.next_tag }}'
base: main
title: Release ${{ steps.version.outputs.next_tag }}
labels: chore
assignees: sgratzl
body: |
Releasing ${{ steps.version.outputs.next_tag }}.
89 changes: 89 additions & 0 deletions .github/workflows/release_helper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Release Helper
on:
push:
branches:
- main

jobs:
correct_repository:
runs-on: ubuntu-latest
steps:
- name: fail on fork
if: github.repository_owner != 'upsetjs'
run: exit 1

create_release:
needs: correct_repository
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Extract version
id: extract_version
run: node -pe "'::set-output name=version::' + require('./package.json').version"
- name: Create Release
id: create_release
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: ${{ steps.extract_version.outputs.version }}
publish: true
outputs:
version: ${{ steps.extract_version.outputs.version }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
tag_name: ${{ steps.create_release.outputs.tag_name }}

build_assets:
needs: create_release
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: npm i -g yarn
- run: yarn config set checksumBehavior ignore
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: |
./.yarn/cache
./.yarn/unplugged
key: ${{ runner.os }}-yarn2-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2-v4
- run: yarn install
- run: yarn build
- run: yarn pack
- name: Upload Release Asset
uses: AButler/upload-release-assets@v2.0
with:
files: 'package.tgz'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ needs.create_release.outputs.tag_name }}
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
check-version: true

sync_dev:
needs: correct_repository
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
ref: dev
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
- name: Reset dev branch
run: |
git fetch origin main:main
git merge main
git push
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ npm-debug.log*
/coverage
/node_modules
.npm
/.yarnrc.yml
/.yarn
/.pnp.js
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/versions
.pnp.*

# Build files
/.tmp
Expand All @@ -18,4 +21,5 @@ npm-debug.log*
/.vscode/extensions.json
/docs
samples/*.map
samples/*.js
samples/*.js
*.tsbuildinfo
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/.pnp.js
/.pnp.*
/.yarnrc.yml
/.yarn
/build
Expand All @@ -10,6 +10,7 @@
/LICENSE
/yarn.lock
/.vscode
*.tsbuildinfo
*.map
samples/*.js
src/**/*.js
17 changes: 0 additions & 17 deletions .release-it.json

This file was deleted.

9 changes: 4 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"eslint.enable": true,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"[javascript]": {
Expand All @@ -8,9 +7,6 @@
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
Expand All @@ -24,5 +20,8 @@
"editor.tabSize": 2,
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"npm.packageManager": "yarn"
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
}
}
768 changes: 768 additions & 0 deletions .yarn/releases/yarn-3.1.0.cjs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
packageExtensions:
eslint-config-airbnb-typescript@*:
dependencies:
eslint-config-airbnb-base: "*"
eslint-module-utils@*:
dependencies:
eslint-import-resolver-node: "*"

yarnPath: .yarn/releases/yarn-3.1.0.cjs
1 change: 0 additions & 1 deletion .yarnrc_patch.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Samuel Gratzl
Copyright (c) 2021 Samuel Gratzl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 5726afd

Please sign in to comment.