From 19cf2099206178e31670038356e983017cf0b70c Mon Sep 17 00:00:00 2001 From: lars-berger Date: Fri, 29 Dec 2023 20:39:06 +0000 Subject: [PATCH] ci: update release workflow (#11) --- .github/workflows/ci.yaml | 2 +- .github/workflows/pr-title-check.yaml | 4 ++-- .github/workflows/pre-release.yaml | 30 --------------------------- .github/workflows/release.yaml | 25 +++++++++++----------- 4 files changed, 16 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/pre-release.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 982749f..3c6c9bf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,7 +3,7 @@ name: CI on: push jobs: - build: + ci: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pr-title-check.yaml b/.github/workflows/pr-title-check.yaml index 7402a18..083b4ff 100644 --- a/.github/workflows/pr-title-check.yaml +++ b/.github/workflows/pr-title-check.yaml @@ -5,9 +5,9 @@ on: types: [opened, edited, synchronize, reopened] jobs: - validate: + pr-title-check: runs-on: ubuntu-latest steps: - uses: glzr-io/actions/semantic-prs@main with: - gh_token: ${{ secrets.GITHUB_TOKEN }} + gh-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml deleted file mode 100644 index 627db52..0000000 --- a/.github/workflows/pre-release.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Pre-release - -on: - push: - branches: ['main'] - -permissions: - contents: write - issues: write - pull-requests: write - id-token: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Semantic release - uses: glzr-io/actions/semantic-release@main - with: - is_prerelease: true - repository_url: 'github.com:glzr-io/glazewm-js.git' - gh_publish: true - gh_token: ${{ secrets.GITHUB_TOKEN }} - npm_publish: true - npm_token: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dc728a2..4c34035 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,6 +1,9 @@ name: Release -on: workflow_dispatch +on: + workflow_dispatch: + push: + branches: [main] permissions: contents: write @@ -9,20 +12,18 @@ permissions: id-token: write jobs: - build: + release: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Semantic release - uses: glzr-io/actions/semantic-release@main + - uses: glzr-io/actions/semantic-release@main with: - is_prerelease: false - repository_url: 'github.com:glzr-io/glazewm-js.git' - gh_publish: true - gh_token: ${{ secrets.GITHUB_TOKEN }} - npm_publish: true - npm_token: ${{ secrets.NPM_TOKEN }} + is-prerelease: false + gh-publish: true + gh-token: ${{ secrets.GITHUB_TOKEN }} + gh-draft-release: false + npm-publish: true + npm-token: ${{ secrets.NPM_TOKEN }}