From f995fac1e034270dc1fa09742f8f18e39348d373 Mon Sep 17 00:00:00 2001 From: ericlam Date: Fri, 4 Oct 2024 16:31:48 +0800 Subject: [PATCH] upgraded deprecated github actions --- .github/workflows/publish.yml | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3bda8a2..2829132 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,6 +10,9 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: write + packages: read steps: - name: Checkout Source Code id: checkout-source @@ -24,32 +27,21 @@ jobs: id: project - name: Delete existing release and tag + continue-on-error: true id: delete-tag-release - uses: dev-drprasad/delete-tag-and-release@v0.1.2 - with: - tag_name: ${{ steps.project.outputs.version }} - delete_release: true + run: gh release delete ${{ steps.project.outputs.version }} --yes --cleanup-tag + + - name: zip plugins + run: zip -r plugins.zip outputs - name: Create Release id: create_release - # TODO: this action is deprecated - uses: actions/create-release@v1 + uses: softprops/action-gh-release@v2 with: tag_name: ${{ steps.project.outputs.version }} - release_name: Release ${{ github.repository }} v${{ steps.project.outputs.version }} + name: Release ${{ github.repository }} v${{ steps.project.outputs.version }} body: 請到 [wiki](https://eric2788.gitbook.io/eldependenci/references/version-update) 查看更新內容 - - name: zip plugins - run: zip -r plugins.zip outputs - - - name: Upload Release jar - id: upload-release-asset-jar - # TODO: this action is deprecated - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./plugins.zip - asset_name: plugins.zip - asset_content_type: application/zip + files: plugins.zip - name: 'Update javadocs' run: |