Merge pull request #866 from sjinks/prepare-2.4.1 #9
Workflow file for this run
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
name: Release | |
on: | |
push: | |
tags: | |
- "**" | |
permissions: | |
contents: none | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
attestations: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Generate self-contained package | |
run: | | |
git archive --format=tar --prefix=two-factor-provider-webauthn/ HEAD | (cd /var/tmp/ && tar xf -) | |
(cd /var/tmp/two-factor-provider-webauthn && composer install --no-dev --no-interaction && composer remove --update-no-dev --no-interaction composer/installers cweagans/composer-patches && rm -rf composer.lock composer.json patches vendor/madwizard/webauthn/.github vendor/madwizard/webauthn/conformance vendor/madwizard/webauthn/tests vendor/psr/http-message/docs vendor/psr/log/Psr/Log/Test vendor/typisttech) && \ | |
(cd /var/tmp && zip -r -9 two-factor-provider-webauthn.zip two-factor-provider-webauthn) | |
- name: Attest build provenance | |
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3 | |
id: attest | |
with: | |
subject-path: /var/tmp/two-factor-provider-webauthn.zip | |
- name: Generate provenance file | |
run: | | |
jq .dsseEnvelope "${{ steps.attest.outputs.bundle-path }}" > /var/tmp/two-factor-provider-webauthn.intoto.jsonl | |
- name: Release | |
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 | |
with: | |
generate_release_notes: true | |
files: | | |
/var/tmp/two-factor-provider-webauthn.zip | |
/var/tmp/two-factor-provider-webauthn.intoto.jsonl | |
deploy: | |
name: Deploy to wordpress.org | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
environment: deploy | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Check out | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Install dependencies to bundle | |
run: | | |
composer install --no-dev --no-interaction | |
composer remove --update-no-dev --no-interaction composer/installers cweagans/composer-patches | |
rm -rf composer.lock composer.json patches vendor/madwizard/webauthn/{.github,conformance,tests} vendor/psr/log/Psr/Log/Test vendor/psr/http-message/docs vendor/typisttech | |
- name: Deploy to wordpress.org | |
uses: 10up/action-wordpress-plugin-deploy@abb939a0d0bfd01063e8d1933833209201557381 # 2.2.2 | |
env: | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SLUG: two-factor-provider-webauthn |