Skip to content

Commit

Permalink
The changes made in this commit include:
Browse files Browse the repository at this point in the history
- Modified .github/workflows/release.yml to change the order of operations in the release workflow.
  Specifically, the zip file is now copied to the plugin directory earlier in the workflow.
  The working directory for the 'Publish Release' step has also been updated to reflect this change.
  Additionally, the 'Prepare Release' step has been added to list the contents of the plugin directory after the zip file is copied.
  The 'TODO' comment has been updated to indicate a future change related to the discussion category for the release.
  Finally, the zip file has been added to the list of assets for the release.
  • Loading branch information
ncx-kevinCefalu committed Sep 28, 2023
1 parent 81cf321 commit 3eba2a8
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,24 @@ jobs:
name: ${{ env.PLUGIN_NAME }}-artifacts
path: dist/

- name: 📦 Prepare Release
working-directory: dist
run: |
# Copy zip file to same directory as plugin files
cp ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}/
ls -la ${{ env.PLUGIN_NAME }}
- name: 🥳 Publish Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: dist
working-directory: dist/${{ env.PLUGIN_NAME }}
run: |
tag="${GITHUB_REF#refs/tags/}"
zip="${{ env.PLUGIN_NAME }}.zip"
echo "Creating release for refs/tags/$tag"
cp ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}/
cd ${{ env.PLUGIN_NAME }}/
# TODO: Change based on tag
# TODO: Re-add `--discussion-category "Announcements"`
gh release create "$tag" --title="v$tag" --prerelease \
--discussion-category "Announcements" "$zip" \
main.js manifest.json styles.css templates/*.template.md
main.js manifest.json styles.css templates/*.template.md \
'${{ env.PLUGIN_NAME }}.zip#Plugin Package'

0 comments on commit 3eba2a8

Please sign in to comment.