Update ts-ci, remove changelog, use github release generated body instead
This commit is contained in:
parent
95cda8538f
commit
9d8d30a864
25
.github/release.yaml
vendored
Normal file
25
.github/release.yaml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
changelog:
|
||||||
|
exclude:
|
||||||
|
labels:
|
||||||
|
- ignore-for-release
|
||||||
|
authors:
|
||||||
|
- octocat
|
||||||
|
categories:
|
||||||
|
- title: Breaking Changes 🛠
|
||||||
|
labels:
|
||||||
|
- breaking
|
||||||
|
- title: Exciting New Features 🎉
|
||||||
|
labels:
|
||||||
|
- feature
|
||||||
|
- title: Fixes 🔧
|
||||||
|
labels:
|
||||||
|
- fix
|
||||||
|
- title: Documentation 🔧
|
||||||
|
labels:
|
||||||
|
- docs
|
||||||
|
- title: CI 👷
|
||||||
|
labels:
|
||||||
|
- ci
|
||||||
|
- title: Other Changes
|
||||||
|
labels:
|
||||||
|
- '*'
|
55
.github/workflows/ci.yaml
vendored
55
.github/workflows/ci.yaml
vendored
@ -9,13 +9,14 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
test_formatting:
|
test_lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ !github.event.created && github.repository != 'garronej/ts-ci' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2.3.4
|
||||||
- uses: actions/setup-node@v2.1.3
|
- uses: actions/setup-node@v2.1.3
|
||||||
- uses: bahmutov/npm-install@v1.8.15
|
- uses: bahmutov/npm-install@v1
|
||||||
- name: If this step fails run 'yarn format' then commit again.
|
- name: If this step fails run 'npm run lint' and 'npm run format' then commit again.
|
||||||
run: |
|
run: |
|
||||||
PACKAGE_MANAGER=npm
|
PACKAGE_MANAGER=npm
|
||||||
if [ -f "./yarn.lock" ]; then
|
if [ -f "./yarn.lock" ]; then
|
||||||
@ -24,7 +25,7 @@ jobs:
|
|||||||
$PACKAGE_MANAGER run format:check
|
$PACKAGE_MANAGER run format:check
|
||||||
test:
|
test:
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
needs: test_formatting
|
needs: test_lint
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
strategy:
|
strategy:
|
||||||
@ -34,14 +35,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Tell if project is using npm or yarn
|
- name: Tell if project is using npm or yarn
|
||||||
id: step1
|
id: step1
|
||||||
uses: garronej/ts-ci@v1.1.6
|
uses: garronej/ts-ci@v1.1.4
|
||||||
with:
|
with:
|
||||||
action_name: tell_if_project_uses_npm_or_yarn
|
action_name: tell_if_project_uses_npm_or_yarn
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2.3.4
|
||||||
- uses: actions/setup-node@v2.1.3
|
- uses: actions/setup-node@v2.1.3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
- uses: bahmutov/npm-install@v1.8.15
|
- uses: bahmutov/npm-install@v1
|
||||||
- if: steps.step1.outputs.npm_or_yarn == 'yarn'
|
- if: steps.step1.outputs.npm_or_yarn == 'yarn'
|
||||||
run: |
|
run: |
|
||||||
yarn build
|
yarn build
|
||||||
@ -66,54 +67,40 @@ jobs:
|
|||||||
is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }}
|
is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }}
|
||||||
is_release_beta: ${{steps.step1.outputs.is_release_beta }}
|
is_release_beta: ${{steps.step1.outputs.is_release_beta }}
|
||||||
steps:
|
steps:
|
||||||
- uses: garronej/ts-ci@v1.1.6
|
- uses: garronej/ts-ci@v1.1.4
|
||||||
id: step1
|
id: step1
|
||||||
with:
|
with:
|
||||||
action_name: is_package_json_version_upgraded
|
action_name: is_package_json_version_upgraded
|
||||||
branch: ${{ github.head_ref || github.ref }}
|
branch: ${{ github.head_ref || github.ref }}
|
||||||
|
|
||||||
update_changelog:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: check_if_version_upgraded
|
|
||||||
if: needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true'
|
|
||||||
steps:
|
|
||||||
- uses: garronej/ts-ci@v1.1.6
|
|
||||||
with:
|
|
||||||
action_name: update_changelog
|
|
||||||
branch: ${{ github.head_ref || github.ref }}
|
|
||||||
|
|
||||||
create_github_release:
|
create_github_release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# We create a release only if the version have been upgraded and we are on a default branch
|
||||||
|
# PR on the default branch can release beta but not real release
|
||||||
|
if: |
|
||||||
|
needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true' &&
|
||||||
|
(
|
||||||
|
github.event_name == 'push' ||
|
||||||
|
needs.check_if_version_upgraded.outputs.is_release_beta == 'true'
|
||||||
|
)
|
||||||
needs:
|
needs:
|
||||||
- update_changelog
|
|
||||||
- check_if_version_upgraded
|
- check_if_version_upgraded
|
||||||
steps:
|
steps:
|
||||||
- name: Build GitHub release body
|
- uses: softprops/action-gh-release@v1
|
||||||
id: step1
|
|
||||||
run: |
|
|
||||||
if [ "$FROM_VERSION" = "0.0.0" ]; then
|
|
||||||
echo "::set-output name=body::🚀"
|
|
||||||
else
|
|
||||||
echo "::set-output name=body::📋 [CHANGELOG](https://github.com/$GITHUB_REPOSITORY/blob/v$TO_VERSION/CHANGELOG.md)"
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
FROM_VERSION: ${{ needs.check_if_version_upgraded.outputs.from_version }}
|
|
||||||
TO_VERSION: ${{ needs.check_if_version_upgraded.outputs.to_version }}
|
|
||||||
- uses: garronej/action-gh-release@v0.2.0
|
|
||||||
with:
|
with:
|
||||||
name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
|
name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
|
||||||
tag_name: v${{ needs.check_if_version_upgraded.outputs.to_version }}
|
tag_name: v${{ needs.check_if_version_upgraded.outputs.to_version }}
|
||||||
target_commitish: ${{ github.head_ref || github.ref }}
|
target_commitish: ${{ github.head_ref || github.ref }}
|
||||||
body: ${{ steps.step1.outputs.body }}
|
generate_release_notes: true
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: ${{ needs.check_if_version_upgraded.outputs.is_release_beta == 'true' }}
|
prerelease: ${{ needs.check_if_version_upgraded.outputs.is_release_beta == 'true' }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
publish_on_npm:
|
publish_on_npm:
|
||||||
runs-on: macos-10.15
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- update_changelog
|
- create_github_release
|
||||||
- check_if_version_upgraded
|
- check_if_version_upgraded
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2.3.4
|
||||||
@ -123,7 +110,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '15'
|
node-version: '15'
|
||||||
registry-url: https://registry.npmjs.org/
|
registry-url: https://registry.npmjs.org/
|
||||||
- uses: bahmutov/npm-install@v1.8.15
|
- uses: bahmutov/npm-install@v1
|
||||||
- run: |
|
- run: |
|
||||||
PACKAGE_MANAGER=npm
|
PACKAGE_MANAGER=npm
|
||||||
if [ -f "./yarn.lock" ]; then
|
if [ -f "./yarn.lock" ]; then
|
||||||
|
1021
CHANGELOG.md
1021
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user