diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34777a6..4f95e2e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,8 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} +permissions: + contents: write jobs: build: runs-on: ubuntu-latest @@ -65,7 +67,7 @@ jobs: run: gradle createRelease -Prelease.versionIncrementer=${{ env.versionIncrementer }} # Set Project Version - - name: Set Frontend Version + - name: Set Project Version run: npm version from-git --no-git-tag-version # Build Project @@ -80,4 +82,15 @@ jobs: if: | github.ref == 'refs/heads/main' && github.repository == 'isontheline/vscode-sysmon' - run: gradle pushRelease \ No newline at end of file + run: gradle pushRelease + + # Create Release + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + tag=$(git describe --tags --abbrev=0) + gh release create "$tag" \ + --repo="$GITHUB_REPOSITORY" \ + --title="${tag#v}" \ + --generate-notes \ No newline at end of file diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml deleted file mode 100644 index c0b93ae..0000000 --- a/.github/workflows/create_release.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Create release -on: - push: - tags: - - v* -permissions: - contents: write -jobs: - release: - name: Release pushed tag - runs-on: ubuntu-22.04 - steps: - - name: Create release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref_name }} - run: | - gh release create "$tag" \ - --repo="$GITHUB_REPOSITORY" \ - --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ - --generate-notes \ No newline at end of file