From fc246831fd8698869b6d9e2b8c14325105020707 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Sun, 3 Mar 2024 00:47:31 +0100 Subject: [PATCH] Update maven.yml --- .github/workflows/maven.yml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 6196895..7b42f5c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -23,17 +23,27 @@ jobs: - name: Build with Maven run: mvn -B package --file pom.xml - create_release: + release: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Generate tag - id: tag - run: echo "::set-output name=tag::$(date +'%Y%m%d%H%M%S')" - - - name: Release new version to NPM - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.x' # Stellen Sie sicher, dass diese Version mit semantic-release kompatibel ist. + cache: 'npm' + + - name: Install semantic-release + run: npm install -g semantic-release@latest @semantic-release/changelog @semantic-release/git + + - name: Configure Git + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + + - name: Run semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release