Skip to content

Commit

Permalink
upgraded deprecated github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
eric2788 committed Oct 4, 2024
1 parent 34a7640 commit f995fac
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
steps:
- name: Checkout Source Code
id: checkout-source
Expand All @@ -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: |
Expand Down

0 comments on commit f995fac

Please sign in to comment.