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

[feature] Setup releases with GitHub Actions #198

Open
joshghent opened this issue Jul 5, 2023 · 4 comments
Open

[feature] Setup releases with GitHub Actions #198

joshghent opened this issue Jul 5, 2023 · 4 comments

Comments

@joshghent
Copy link
Owner

As it says on the tin really!

@teschiopol
Copy link

Hi, i did something can be useful to start with:


# Controls when the action will run. Triggers the workflow on push events but only for the master branch
on:
  push:
    branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest
    permissions:
      # Give the default GITHUB_TOKEN write permission to commit and push the
      # added or changed files to the repository.
      contents: write
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-node@v3
      with:
        node-version: '16'
    - name: Install
      run: npm install
    - name: Run script file
      run: npm run todo
    - name: Auto commit
      uses: stefanzweifel/git-auto-commit-action@v4
      with:
        commit_message: Automated TODO
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    - name: Build
      run: npm run build
      env:
        CI: true
    - name: Final Check
      if: ${{success()}}
      run: |
        echo Success

In that case is an auto commit, but for tag it's the same, instead of commit, push a tag. "npm run todo" call a custom script that generate a TODO.md file. Simple switch to manage a CHANGELOG.md based on some rules that we can define.

What do you think?

@joshghent
Copy link
Owner Author

@teschiopol looks good! Agree it needs to tag and push that rather than commit, but nice work!
Did you want to submit a PR?

@teschiopol
Copy link

Do u wanto to trigger that action on every push on master?

@joshghent
Copy link
Owner Author

Sounds good!

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

No branches or pull requests

2 participants