mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Use GitHub builtin readme generator (.github/release.yaml)
This commit is contained in:
parent
4e6986127a
commit
73bebf9ef4
2 changed files with 10 additions and 30 deletions
32
.github/workflows/ci.yaml
vendored
32
.github/workflows/ci.yaml
vendored
|
|
@ -73,33 +73,19 @@ jobs:
|
||||||
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.4
|
|
||||||
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
|
|
||||||
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: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
|
name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
|
||||||
|
|
@ -114,7 +100,7 @@ jobs:
|
||||||
publish_on_npm:
|
publish_on_npm:
|
||||||
runs-on: ubuntu-latest
|
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
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ https://user-images.githubusercontent.com/6702424/167035748-4fe28710-ed0f-4feb-a
|
||||||
This template automates the boring and tedious tasks of:
|
This template automates the boring and tedious tasks of:
|
||||||
- Filling up the ``package.json``
|
- Filling up the ``package.json``
|
||||||
- Setting up Typescript.
|
- Setting up Typescript.
|
||||||
- Writing a [README.md](https://github.com/garronej/ts_ci/blob/main/README.template.md) with decent presentation and instructions on how to install/import your module.
|
|
||||||
- Testing on multiple Node version running on Ubuntu and Windows before publishing.
|
- Testing on multiple Node version running on Ubuntu and Windows before publishing.
|
||||||
- Maintaining a CHANGELOG.
|
- Maintaining a CHANGELOG.
|
||||||
- Publishing on NPM and creating corresponding GitHub releases.
|
- Publishing on NPM and creating corresponding GitHub releases.
|
||||||
|
|
@ -72,11 +71,6 @@ You can increase the verbosity by creating a new secret `ACTIONS_STEP_DEBUG` and
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## How to put my own image in the ``README.md``
|
|
||||||
|
|
||||||
A good way to host your repo image is to open an issue named ASSET in your project, close it, create a comment, drag and drop the picture you want to use and that's it. You have a link that you can replace in the ``README.md``.
|
|
||||||
While you are at it submit this image as *social preview* in your repos github page's settings so that when you share on
|
|
||||||
Twitter or Reddit you don't get your GitHub profile picture to show up.
|
|
||||||
## Disable linting and formatting
|
## Disable linting and formatting
|
||||||
|
|
||||||
Remove [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L15-L18), [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L20-L32) and [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L47-L53) from your `package.json`
|
Remove [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L15-L18), [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L20-L32) and [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L47-L53) from your `package.json`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue