From 27ea278be64972cfdec8a21b2afc57a9697d42d9 Mon Sep 17 00:00:00 2001 From: tamiroh Date: Tue, 23 Jan 2024 21:21:11 +0900 Subject: [PATCH 1/4] Update --- .github/workflows/release-drafter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index f86e895..59fe628 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -6,6 +6,7 @@ on: - main pull_request: types: [opened, reopened, synchronize] + workflow_dispatch: permissions: contents: read From b1e064c1a6a5f3f49df3ce3d7c97b6b607397faf Mon Sep 17 00:00:00 2001 From: tamiroh Date: Tue, 23 Jan 2024 21:21:45 +0900 Subject: [PATCH 2/4] Update --- .github/workflows/release.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6d9f93..76ed42d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,7 @@ name: Release on: - push: - tags: - - "*" + release: + types: [ published ] env: PLUGIN_NAME: obsidian-interval-timer jobs: @@ -24,22 +23,13 @@ jobs: zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }} ls echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)" - - name: Create Release - id: create_release - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ github.ref }} - name: ${{ github.ref_name }} - generate_release_notes: true - draft: false - prerelease: false - name: Upload zip file id: upload-zip uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ github.event.release.upload_url }} asset_path: ./${{ env.PLUGIN_NAME }}.zip asset_name: ${{ env.PLUGIN_NAME }}-${{ steps.build.outputs.tag_name }}.zip asset_content_type: application/zip @@ -49,7 +39,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ github.event.release.upload_url }} asset_path: ./main.js asset_name: main.js asset_content_type: text/javascript @@ -59,7 +49,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ github.event.release.upload_url }} asset_path: ./manifest.json asset_name: manifest.json asset_content_type: application/json From 3247712db4348ee8cb15d13294a0b11d68448a9d Mon Sep 17 00:00:00 2001 From: tamiroh Date: Tue, 23 Jan 2024 21:26:08 +0900 Subject: [PATCH 3/4] Format --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76ed42d..a4bb735 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ name: Release on: release: - types: [ published ] + types: [published] env: PLUGIN_NAME: obsidian-interval-timer jobs: From 9e2d104b2e88009d4c2a81b2e1bc55b3f52be53f Mon Sep 17 00:00:00 2001 From: tamiroh Date: Tue, 23 Jan 2024 21:27:39 +0900 Subject: [PATCH 4/4] Fix --- .github/workflows/release-drafter.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 59fe628..d227f12 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -4,8 +4,6 @@ on: push: branches: - main - pull_request: - types: [opened, reopened, synchronize] workflow_dispatch: permissions: