Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update builds and use release workflows #82

Merged
merged 18 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'enhancement'
- 'feature'
- 'style'
- 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
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.1.4
- uses: actions/checkout@v3
- uses: actions/setup-node@v2.4.0
with:
node-version: '14.x'
node-version: 16
- 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.1.4
uses: actions/cache@v3
with:
path: |
./.yarn
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock') }}
./.yarn/cache
./.yarn/unplugged
~/.cache/Cypress
key: ${{ runner.os }}-yarn2-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2
${{ runner.os }}-yarn2-v4
- run: yarn install
- run: yarn clean
- run: yarn compile
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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
preid:
description: 'Pre Release Identifier (i.e., alpha, beta)'
required: true
default: alpha

jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
ref: main
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Reset main branch
run: |
git fetch origin develop:develop
git reset --hard develop
- name: Change version number
id: version
run: |
echo -n "::set-output name=next_tag::"
npm version --no-git-tag-version ${{ github.event.inputs.versionName }} --preid ${{ github.event.inputs.preid }}
- name: Create pull request into main
uses: peter-evans/create-pull-request@v4
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
reviewers: sgratzl
assignees: sgratzl
body: |
Releasing ${{ steps.version.outputs.next_tag }}.
63 changes: 63 additions & 0 deletions .github/workflows/release_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release Main

on:
push:
branches:
- main

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

create_release:
needs: correct_repository
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Extract version
id: extract_version
run: |
node -pe "'::set-output name=version::' + require('./package.json').version"
node -pe "'::set-output name=npm_tag::' + (require('./package.json').version.includes('-') ? 'next' : 'latest')"
- name: Print version
run: |
echo "releasing ${{ steps.extract_version.outputs.version }} with tag ${{ steps.extract_version.outputs.npm_tag }}"
- name: Create Release
id: create_release
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.PRIVATE_GITHUB_TOKEN }}
with:
name: v${{ steps.extract_version.outputs.version }}
tag: v${{ steps.extract_version.outputs.version }}
version: ${{ steps.extract_version.outputs.version }}
prerelease: ${{ needs.extract_version.outputs.npm_tag == 'next' }}
publish: true
outputs:
version: ${{ steps.extract_version.outputs.version }}
npm_tag: ${{ steps.extract_version.outputs.npm_tag }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
tag_name: ${{ steps.create_release.outputs.tag_name }}

sync_dev:
needs: correct_repository
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
ref: develop
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Reset dev branch
run: |
git fetch origin main:main
git merge main
git push
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ node_modules/
*.css
*.log
*.tsbuildinfo
/.yarn
/.pnp.js
/.yarnrc.yml
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/versions
.pnp.*
*.tgz
*.zip
/tmp
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/.stylelintrc
/.editorconfig
/.yarn
/.pnp.js
/.pnp.*
/.yarnrc.yml
/.vscode
/tmp
Expand Down
17 changes: 0 additions & 17 deletions .release-it.json

This file was deleted.

10 changes: 5 additions & 5 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"plugins": [
"stylelint-scss",
"stylelint-prettier",
"extends": [
"stylelint-config-prettier-scss",
"stylelint-config-standard-scss"
],
"extends": "stylelint-config-standard",
"rules": {
"prettier/prettier": true,
"string-quotes": "single",
"no-descending-specificity": null,
"value-list-comma-newline-after": null,
"declaration-colon-newline-after": null,
"at-rule-no-unknown": null,
"at-rule-empty-line-before": null,
"block-closing-brace-newline-after": null,
"selector-id-pattern": null,
"scss/at-rule-no-unknown": true,
"scss/at-extend-no-missing-placeholder": true,
"scss/at-else-closing-brace-newline-after": "always-last-in-chain",
Expand Down
785 changes: 785 additions & 0 deletions .yarn/releases/yarn-3.2.0.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarnPath: .yarn/releases/yarn-3.2.0.cjs
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ The application is deployed at: https://lineup.js.org/app. The develop version u
- last 2 Edge versions (best performance)
- last 2 Firefox versions
- Firefox [Extended Support Release](https://www.mozilla.org/en-US/firefox/enterprise/) (ESR)
- Edge 18

## Usage

Expand All @@ -57,11 +56,8 @@ This app is a client only app. Thus, requires no server since all data is stored
git clone https://github.com/lineupjs/lineup_app.git
cd lineup_app
npm i -g yarn
yarn set version berry
yarn set version latest
# cat .yarnrc_patch.yml >> .yarnrc.yml
yarn install
yarn pnpify --sdk vscode
yarn sdks vscode
```

### Common commands
Expand All @@ -75,8 +71,6 @@ yarn lint
yarn fix
yarn build
yarn docs
yarn release
yarn release:pre
```

## Authors
Expand Down
Loading