-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Creating a GitHub release with plugin assets #8
Comments
Would this be something specific to WordPress plugins or more of a generic "upload a ZIP file without the tag name" GitHub release helper? I agree that the file naming is an issue, I run into it on a couple of plugins that aren't released on .org, I just wasn't thinking about it here because it's not really WordPress-specific. |
@helen In our organization, I have to deploy plugins to .org periodically. After a tag has been pushed this action will run and does its task but the real missing thing is Github release. Currently, Mike Jolley's deploy script just create a GitHub release but doesn't attach plugin archive as release assets. If this action simply had an option to create a release in GitHub or not then that will be much enough. The second important thing why I want plugin archive as release asset is because of a tag name attached for an archive which you have faced too. If this is possible, then it will be a great option for plugin developers. Automating GitHub and .org release by just creating a tag will be a lifesaver for me :) |
I don't think I'm quite following, so please let me know if these are the things you are looking for:
If those are accurate, I think the second one is worth looking into, but isn't really WordPress-specific, so I'd want to take a look at whether somebody has already solved that with an Action and then go from there. |
You catch my difficulty so clearly, exactly I was looking for those above mentions points. I would really appreciate if you go through both but I better know you can handle this very nicely for WordPress users. Additional to this please give a look to this action by lubusIN for the archive action. For a nerd like me, this will be a lifesaver :) |
@helen any updates in attaching differently-named ZIP file to the release? I found this project was moved to https://github.com/10up/action-wordpress-plugin-deploy |
@helen Can we receive "zip_path" output so we can implement that into name: Deploy to WordPress.org
on:
release:
types: [published]
jobs:
tag:
name: New tag
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: |
npm install
npm run build
- name: WordPress Plugin Deploy
id: deploy # ID to supply in other steps.
uses: 10up/action-wordpress-plugin-deploy@master
with:
generate-zip: true # bollean so users with can opt-out of generation zip.
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.deploy.outputs.zip_path }} # here to implement zip path from deploy action.
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip This can be received from this bit of code but don't know where to implement in if ! $GENERATE_ZIP; then
echo "Generating zip file..."
cd "$BUILD_PATH" || exit
zip -r "${PLUGIN_SLUG}.zip" "$PLUGIN_SLUG/"
# Set GitHub "zip_path" output
echo "::set-output name=zip_path::$BUILD_PATH/${PLUGIN_SLUG}.zip"
echo "Zip file generated!"
fi |
Closed in favor of 10up/action-wordpress-plugin-deploy#37 |
@helen Currently, I use Mike Jolley's deploy script and it has a cool way to create GitHub release without any assets attached. Thus, during a plugin deployment to WP.org directory, can a feature to create GitHub release with plugin assets included similar to WP.org plugin archive.
Plugin asset is needed because as a file
.gitattributes
respects export ignorance but while downloading source code zip from release assets filename will be likeslug-1.0.0.zip
, thus adding up the archiveslug.zip
to release assets will be of great help.The text was updated successfully, but these errors were encountered: