chore(deps): update dependency husky to v9 (#332) #446
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
tags: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm install | |
- run: npm run all | |
- name: Create idoc config | |
run: | | |
cat > idoc.yml << EOF | |
site: "Create Tag {{version}}" | |
menus: | |
Home: index.html | |
Sponsor: https://jaywcjlove.github.io/#/sponsor | |
footer: | | |
<a href="https://jaywcjlove.github.io/#/sponsor" target="_blank">Sponsor</a> • | |
<a href="https://jaywcjlove.github.io/changelog-generator" target="_blank">Changelog Generator</a> • | |
<a href="https://jaywcjlove.github.io/github-action-contributors" target="_blank">Contributors</a> • | |
<a href="https://jaywcjlove.github.io/github-action-read-file" target="_blank">Read File Content</a> • | |
<a href="https://jaywcjlove.github.io/generated-badges" target="_blank">Generated Badges</a> | |
<br /> | |
Released under the MIT License. Copyright © {{idocYear}} Kenny Wong<br /> | |
Generated by <a href="https://github.com/jaywcjlove/idoc" target="_blank">idoc</a> v{{idocVersion}} | |
EOF | |
- run: npm install idoc@1.27.2 -g | |
- run: idoc | |
- run: ls -al | |
- run: pwd | |
- name: Is a tag/release created auto? | |
id: create_tag | |
uses: ./ | |
with: | |
# test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' | |
package-path: ./package.json | |
# - name: Test Create Tag | |
# uses: jaywcjlove/create-tag-action@main | |
# with: | |
# test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' | |
- name: get tag version | |
id: tag_version | |
uses: jaywcjlove/changelog-generator@main | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
- name: Generate Changelog | |
id: changelog | |
uses: jaywcjlove/changelog-generator@main | |
with: | |
head-ref: ${{steps.create_tag.outputs.version}} | |
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' | |
- run: echo "version - ${{ steps.create_tag.outputs.version }}" | |
- run: echo "preversion - ${{ steps.create_tag.outputs.preversion }}" | |
- run: echo "versionNumber - ${{ steps.create_tag.outputs.versionNumber }}" | |
- run: echo "versionNumber - ${{ steps.create_tag.outputs.versionNumber }}" | |
- run: echo "preversionNumber - ${{ steps.create_tag.outputs.preversionNumber }}" | |
- run: echo "majorVersion - ${{ steps.create_tag.outputs.majorVersion }}" | |
- run: echo "minorVersion - ${{ steps.create_tag.outputs.minorVersion }}" | |
- run: echo "patchVersion - ${{ steps.create_tag.outputs.patchVersion }}" | |
- run: echo "preversion - ${{ steps.create_tag.outputs.preversion }}" | |
- run: echo "successful - ${{ steps.create_tag.outputs.successful }}" | |
- run: echo "compareurl - ${{ steps.changelog.outputs.compareurl }}" | |
- name: if .... | |
if: steps.create_tag.outputs.successful | |
run: echo "⚠️ successful - ${{ steps.create_tag.outputs.successful }}" | |
- name: Create Release | |
uses: ./ | |
with: | |
# test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' | |
package-path: ./package.json | |
release: true | |
body: | | |
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/create-tag-action/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html | |
Comparing Changes: ${{ steps.changelog.outputs.compareurl }} | |
```yml | |
- name: Create Tags From | |
uses: jaywcjlove/create-tag-action@${{ steps.create_tag.outputs.version }} | |
with: | |
token: # Your GITHUB_TOKEN | |
test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' | |
# package-path: ./package.json | |
``` | |
${{ steps.changelog.outputs.changelog }} | |
# - name: Create Release | |
# uses: ncipollo/release-action@v1 | |
# if: steps.create_tag.outputs.successful | |
# with: | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# name: ${{ steps.create_tag.outputs.version }} | |
# tag: ${{ steps.create_tag.outputs.version }} | |
# body: | | |
# ${{ steps.changelog.outputs.compareurl }} | |
# ```yml | |
# - name: Create Tags From | |
# uses: jaywcjlove/create-tag-action@${{ steps.create_tag.outputs.version }} | |
# with: | |
# token: # Your GITHUB_TOKEN | |
# test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' | |
# # package-path: ./package.json | |
# ``` | |
# ${{ steps.changelog.outputs.changelog }} | |
- run: echo "changelog -> ${{ steps.changelog.outputs.tag }}" | |
- run: echo "changelog -> ${{ steps.changelog.outputs.version }}" | |
- run: echo "changelog -> ${{ steps.changelog.outputs.branch }}" | |
outputs: | |
version: ${{ steps.changelog.outputs.version }} | |
tag: ${{ steps.changelog.outputs.tag }} | |
successful: ${{steps.create_tag.outputs.successful }} | |
test: | |
needs: [tags] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: echo "successful - ${{ needs.tags.outputs.version }}" | |
- run: echo "compareurl - ${{ needs.tags.outputs.tag }}" | |
- name: if .... | |
if: needs.tags.outputs.successful | |
run: echo "⚠️ successful - ${{ needs.tags.outputs.successful }}" |