fix: center iframe on success screen (#95) #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Job that makes prereleases on the alpha and beta branches. | |
# Excluded files and folders that should not be part of the plugin is defined in .distignore | |
# Plugin can be downloaded from the release page on GitHub | |
name: Prerelease | |
on: | |
push: | |
branches: | |
# - beta | |
# - alpha | |
jobs: | |
calculate-next-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: npm ci | |
# Running semantic-release in dry-run mode to calculate the next version, without publishing anything | |
- run: npx semantic-release --dry-run | |
id: calculate-next-version | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
outputs: | |
new-release-published: ${{ steps.calculate-next-version.outputs.new-release-published }} | |
new-release-version: ${{ steps.calculate-next-version.outputs.new-release-version }} | |
prerelease: | |
runs-on: ubuntu-latest | |
needs: calculate-next-version | |
if: needs.calculate-next-version.outputs.new-release-published == 'true' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Semantic Release - create prerelease | |
id: semantic | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Creates the plugin zip and excludes the files from .distignore, then uploads it as an artifact (unzipped since github zips it automatically) | |
- name: Build plugin zip | |
id: build_zip | |
uses: 10up/action-wordpress-plugin-build-zip@stable | |
# We need to download the plugin artifact to be able to use it in the next steps | |
- name: Download the plugin artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }} | |
path: ${{ github.workspace }}/zipfile | |
# Re-zip the plugin artifact to be able to upload it as a release asset | |
- name: Re-zip the plugin artifact | |
run: | | |
cd zipfile | |
zip -r ../${{ github.event.repository.name }}.zip . | |
# Upload the plugin zip as a release asset | |
- name: Update GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: v${{ needs.calculate-next-version.outputs.new-release-version }} | |
files: ./${{ github.event.repository.name }}.zip | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |