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

CI-CD setup #8

Open
SimonvdFliert opened this issue Jan 12, 2025 · 2 comments
Open

CI-CD setup #8

SimonvdFliert opened this issue Jan 12, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@SimonvdFliert
Copy link
Collaborator

No description provided.

@SimonvdFliert
Copy link
Collaborator Author

Een ouder stuk code, zou moeten werken

name: Release

on:
push:
branches:
- main

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write

steps:
  - name: Checkout code
    uses: actions/checkout@v4
    with:
      fetch-depth: 0 # Fetch all history for tags
  - name: Set up Node.js
    uses: actions/setup-node@v4
    with:
      node-version: '20'
      registry-url: 'https://registry.npmjs.org/'

  - name: Install dependencies
    run: npm ci

  - name: Build the project
    run: npm run build

  - name: Publish with Semantic Release
    run: npm run release

@SimonvdFliert
Copy link
Collaborator Author

SimonvdFliert commented Jan 12, 2025

semantic-release package nodig

{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"@semantic-release/npm"
]
}

"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^10.1.6",
"@semantic-release/npm": "^10.0.4",
"@semantic-release/release-notes-generator": "^14.0.1",
"semantic-release": "^21.0.7",

In je package.json zet je de volgende script
"release": "semantic-release",

@SimonvdFliert SimonvdFliert self-assigned this Jan 16, 2025
@SimonvdFliert SimonvdFliert added the enhancement New feature or request label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant