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

feat: release action #38

Open
zackha opened this issue May 4, 2023 · 1 comment
Open

feat: release action #38

zackha opened this issue May 4, 2023 · 1 comment

Comments

@zackha
Copy link
Contributor

zackha commented May 4, 2023

Hi @scottyzen,

Using GitHub's release feature for your Woonuxt project can increase the number of views on your project's GitHub page. Therefore, it would be great to use releases in this project. You can follow the steps below for this.

Step 1 - Generate Changelogs

We want the release we will make to automatically create a changelog, so we create a file path with the extension .github/workflows in the GitHub action and add a workflow file named release.yml inside.

# .github/workflows/release.yml

name: Release

permissions:
  contents: write

on:
  push:
    tags:
      - 'v*'

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - uses: actions/setup-node@v3
        with:
          node-version: 18.x

      - run: npx changelogithub
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

It will be trigged whenever you push a tag to GitHub that starts with v.

This workflow file will save the following written commits as a changelog for the release.

feat: { title: '🚀 Features' },
fix: { title: '🐞 Bug Fixes' },
perf: { title: '🏎 Performance' },

👉 Changelog example

If you are using GitHub Actions and it's triggered by the correct event, the GITHUB_TOKEN will be generated automatically. If not you might go to /settings/actions to check your permission setting.

image

Step 2 - Install bumpp

npm install -g bumpp

Add the following script to the package.json file

"release": "bumpp"

and run.

npm run release

You can run the command directly by using the npx bumpp command instead of adding an extra command to the script.

Screenshot

That's all for the processes.

Best Regards,

@zackha zackha changed the title feat: Release Action feat: release action May 4, 2023
@scottyzen
Copy link
Owner

Hey @zackha. You're absolutely right. I've never done it before but I'll definitely read up on it. Thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants