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

Bun in the oven #59

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
251ec68
Update metadata
woksin Aug 11, 2023
240a912
Update workflows
woksin Aug 11, 2023
69bc275
Update files
woksin Aug 11, 2023
d7e66d4
Remove traces of cascading release
woksin Aug 11, 2023
0671743
Add new input and improve
woksin Aug 11, 2023
18cb41e
Merge pull request #1 from woksin-org/upgrade
woksin Aug 11, 2023
81cd372
"Add version 3.0.0 to changelog"
woksin Aug 11, 2023
ec0dbbe
Add new-version to output
woksin Aug 11, 2023
55d75c5
Add version incrementor
woksin Aug 11, 2023
000a3f2
Fix tests
woksin Aug 11, 2023
604663b
Fix context establisher
woksin Aug 11, 2023
2991887
Remove increment version step
woksin Aug 11, 2023
02ff556
Merge pull request #2 from woksin-org/upgrade
woksin Aug 11, 2023
e4a2c56
"Add version 4.0.0 to changelog"
woksin Aug 11, 2023
5310aba
Rework the workflows
woksin Aug 11, 2023
a7c2bdd
Fix
woksin Aug 11, 2023
9376a13
Merge pull request #3 from woksin-org/upgrade
woksin Aug 11, 2023
de56ef6
Fix
woksin Aug 11, 2023
d056bd0
Fix
woksin Aug 11, 2023
2ec9336
Fix release
woksin Aug 11, 2023
6bdfcdc
Use correct build command
woksin Aug 11, 2023
07ba017
Merge pull request #4 from woksin-org/upgrade
woksin Aug 11, 2023
de468f6
"Add version 4.0.1 to changelog"
woksin Aug 11, 2023
095bd1d
No changelog when prerelease
woksin Aug 11, 2023
3d1f5ec
Remove inputs
woksin Aug 11, 2023
864f74d
Small fixes
woksin Aug 11, 2023
7270bd7
Use bun in CI
woksin Sep 12, 2023
5aed35e
Try use bun in workflow
woksin Sep 12, 2023
3316e7b
Try again
woksin Sep 12, 2023
5fee1be
Install bun
woksin Sep 12, 2023
51c1da6
Use yarn in package.json
woksin Sep 12, 2023
a1cd21b
Use npx
woksin Sep 12, 2023
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
3 changes: 1 addition & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# EditorConfig helps create consistency for formatting of all
# the code in Dolittle
# EditorConfig helps create consistency for formatting
#
# http://EditorConfig.org

Expand Down
90 changes: 2 additions & 88 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,92 +1,6 @@
// Copyright (c) Dolittle. All rights reserved.
// Copyright (c) woksin-org. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

module.exports = {
extends: '@dolittle',
rules: {
'@typescript-eslint/unified-signatures': 'off',
'import/no-extraneous-dependencies': 'off',
'eol-last': 'error',
'no-multiple-empty-lines': ['error', {'max': 1, 'maxEOF': 0 }],
'header/header': [
2,
'line',
[
' Copyright (c) Dolittle. All rights reserved.',
' Licensed under the MIT license. See LICENSE file in the project root for full license information.',
],
2
],
'jsdoc/require-param-name': 'error',
'jsdoc/require-param-type': 'error',
'jsdoc/check-alignment': 'error',
'jsdoc/check-indentation': 'error',
'jsdoc/valid-types': 'error',
'jsdoc/require-hyphen-before-param-description': 'error',
'jsdoc/check-line-alignment': 'error',
'jsdoc/require-returns-check': 'error',
'jsdoc/require-returns-description': 'error',
'jsdoc/require-returns-type': 'error',
'jsdoc/check-tag-names': 'error',
'jsdoc/check-param-names': 'error',
'jsdoc/check-types': 'error',
'jsdoc/empty-tags': 'error',
'jsdoc/no-bad-blocks': 'error',
'jsdoc/no-undefined-types': 'error',
'jsdoc/multiline-blocks': 'error',
'jsdoc/no-multi-asterisks': 'error',
'jsdoc/require-asterisk-prefix': 'error',
'jsdoc/require-description-complete-sentence': 'error',
'jsdoc/require-param': 'error',
'jsdoc/require-param-description': 'error',
'jsdoc/tag-lines': ['error', 'always', { 'count': 0 }],

'jsdoc/require-jsdoc': ['error', {
'require': {
'FunctionDeclaration': false
},
'contexts': [
'ExportNamedDeclaration>TSTypeAliasDeclaration',
'ExportNamedDeclaration>TSInterfaceDeclaration',
'ExportNamedDeclaration>ClassDeclaration',
'ExportNamedDeclaration[declaration.type="TSDeclareFunction"]:not(ExportNamedDeclaration[declaration.type="TSDeclareFunction"] + ExportNamedDeclaration[declaration.type="TSDeclareFunction"])',
'ExportNamedDeclaration[declaration.type="FunctionDeclaration"]:not(ExportNamedDeclaration[declaration.type="TSDeclareFunction"] + ExportNamedDeclaration[declaration.type="FunctionDeclaration"])',
'MethodDefinition[accessibility!="private"][value.type="TSEmptyBodyFunctionExpression"]:not(MethodDefinition[value.type="TSEmptyBodyFunctionExpression"] + MethodDefinition[value.type="TSEmptyBodyFunctionExpression"])',
'MethodDefinition[accessibility!="private"][value.type="FunctionExpression"]:not(MethodDefinition[value.type="TSEmptyBodyFunctionExpression"] + MethodDefinition[value.type="FunctionExpression"])',
]
}],

'jsdoc/require-returns': ['error', {
'contexts': [
'ArrowFunctionExpression',
'FunctionDeclaration',
'MethodDefinition[kind!="get"]'
]
}],

'jsdoc/require-description': ['error', {
'descriptionStyle': 'body',
'contexts': ['any']
}],
// This is nice - but makes the linter horribly slow
// 'jsdoc/match-description': ['error', {
// matchDescription: '^(?:[^\\{]+|\\{@link [^\\}]+\\})+$',
// tags: {
// param: true
// },
// message: 'Descriptions must use {@link ...} for references to other types.'
// }],
},
overrides: [
{
files: ['**/for_*/**'],
rules: {
'@typescript-eslint/naming-convention': 'off',
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'no-restricted-globals': 'off',
'jsdoc/require-jsdoc': 'off',
},
},
],
extends: '@woksin'
};
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
push:
branches:
- '**'
- '!main'
- '!master'

jobs:
build:
name: Continuous Integration
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun i
name: Install dependencies
- run: bun run ci
name: Build, Test and Lint
52 changes: 0 additions & 52 deletions .github/workflows/github-javascript-actions-ci.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Establish Context and Release

on:
pull_request:
types: [closed]

jobs:
build:
name: Continuous Integration
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun i
name: Install dependencies
- run: bun run build
name: Build local action
- name: Establish context
id: context
uses: ./
- name: Prepend to Changelog
if: ${{ steps.context.outputs.should-publish == 'true' && steps.context.outputs.release-type != 'prerelease' }}
uses: woksin-org/add-to-changelog-action@v4
with:
version: ${{ steps.context.outputs.new-version }}
body: ${{ steps.context.outputs.pr-body }}
pr-url: ${{ steps.context.outputs.pr-url }}
- name: Create GitHub Release
if: ${{ steps.context.outputs.should-publish == 'true' }}
uses: woksin-org/github-release-action@v3
with:
token: ${{ secrets.BUILD_PAT }}
version: ${{ steps.context.outputs.new-version }}
body: ${{ steps.context.outputs.pr-body }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Github JavaScript Actions CI/CD
name: Release GithubAction as semantic tags

on:
release:
Expand All @@ -15,10 +15,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Release GitHub Action
uses: technote-space/release-github-actions@v8
with:
CLEAN_TARGETS: Source,*.ts,*.js,*.json,*.lock,.[!.]*,Tests,Documentation,node_modules,Distribution
TEST_TAG_PREFIX: test/
ORIGINAL_TAG_PREFIX: original/
CLEAN_TEST_TAG: true
CLEAN_TEST_TAG: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bun.lockb
Release
release
bin
Expand Down
6 changes: 2 additions & 4 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Copyright (c) Dolittle. All rights reserved.
// Copyright (c) woksin-org. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

require('reflect-metadata');
const dolittle = require('@dolittle/typescript.testing/.mocharc.js');

module.exports = dolittle;
module.exports = require('@woksin/typescript.testing/.mocharc');
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# [4.0.1] - 2023-8-11 [PR: #4](https://github.com/woksin-org/establish-context-action/pull/4)
## Summary

Fix workflow


# [4.0.0] - 2023-8-11 [PR: #2](https://github.com/woksin-org/establish-context-action/pull/2)
## Summary

Moves the functionality of woksin-org/increment-version-action into this action for simplification.

### Added

- `new-version` output which is the incremented version based on the release type and the current version.


# [3.0.0] - 2023-8-11 [PR: #1](https://github.com/woksin-org/establish-context-action/pull/1)
## Summary

Summary of the PR here. The GitHub release description is created from this comment so keep it nice and descriptive.

Remember to remove sections that you don't need or use.

### Added

- `release-branches` input which is a list of branches that when merged to a context should be established

### Changed

- `prerelease-branches` input to be a list instead of comma separated list. See Readme for example


# [2.5.7] - 2022-12-5 [PR: #56](https://github.com/dolittle/establish-context-action/pull/56)
## Summary

Expand Down
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 dolittle
Copyright (c) 2023 woksin-org

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
Loading