Skip to content

Commit

Permalink
ci: fix release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Emilien Escalle <[email protected]>
  • Loading branch information
neilime committed Aug 30, 2024
1 parent 5c239a2 commit 8da803f
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 46 deletions.
24 changes: 7 additions & 17 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

1. Do this '...'
2. Then that '....'
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Context**

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- Version: [e.g. 1.0.0]
- OS: [e.g. iOS]

**Additional context**
Add any other context about the problem here.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
Expand Down
75 changes: 47 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ jobs:
needs: ci
runs-on: ubuntu-latest
environment: github-pages
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}

- uses: hoverkraft-tech/ci-github-nodejs/actions/[email protected]

Expand All @@ -25,37 +26,55 @@ jobs:
name: build
path: /

- name: 🔖 Configure publish
env:
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git config --local user.name "${{ github.actor }}"
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
target-branch: main
skip-github-release: true

- name: 📦 Publish NPM packages
if: ${{ steps.release.outputs.release_created }}
env:
GH_TOKEN: ${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
run: |
npx standard-version
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
run: yarn publish --access public

echo `git add -A && git commit -m "chore: prepare release"`
git push --follow-tags origin ${{ github.event.repository.default_branch }}
docs-publish:
name: 📖 Publish documentation
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: ci
steps:
- uses: actions/checkout@v4

npm publish --access public
- uses: actions/download-artifact@v4
with:
name: build
path: /

- name: 🌐 Publish to gh-pages
run: |
mkdir -p /tmp
cp -R build/docs /tmp/publish
cp -R docs /tmp/publish/
- run: |
mkdir ./_site_tmp
echo -e "theme: jekyll-theme-cayman" > ./_site_tmp/_config.yml
cp README.md ./_site_tmp/index.md
cp -R docs ./_site_tmp/
cp -R build/docs ./_site_tmp/typedoc
- name: 🌐 Publish Github pages
uses: peaceiris/[email protected]
- name: ⚙️ Setup Pages
uses: actions/configure-pages@v5

- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: /tmp/publish
enable_jekyll: true
user_name: ${{ github.actor }}
user_email: ${{ github.actor }}@users.noreply.github.com
source: _site_tmp

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

### 🧾 [Documentation](https://reactionable.github.io/reactionable-cli/docs)

### 🇹 [TypeDoc](https://reactionable.github.io/reactionable-cli/typedoc)

## Helping Project

❤️ If this project helps you reduce time to develop and/or you want to help the maintainer of this project. You can [sponsor](https://github.com/sponsors/neilime) him. Thank you !
Expand Down

0 comments on commit 8da803f

Please sign in to comment.