diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85972cf..6a04470 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,10 +7,10 @@ env: VERSION: ${{ github.ref }} # Controls when the action will run. -on: +on: push: - branches: - - "release" + tags: + - '*' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -36,6 +36,8 @@ jobs: cp readme.md package.json nostr.svg logo.svg ${{ env.PLUGIN_NAME }} mv dist ${{ env.PLUGIN_NAME }} 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 uses: ncipollo/release-action@v1.14.0 @@ -58,7 +60,7 @@ jobs: asset_path: ./${{ env.PLUGIN_NAME }}.zip asset_name: ${{ env.PLUGIN_NAME }}-${{ env.VERSION }}.zip asset_content_type: application/zip - + - name: Upload package.json id: upload_metadata uses: actions/upload-release-asset@v1