Increased version #27
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 new version' | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
uses: php-actions/composer@v6 | |
with: | |
php_version: "8.0" | |
- name: Get tagged version | |
run: | | |
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
echo "RELEASE_DATE=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV | |
- name: Archive Release | |
uses: thedoctor0/[email protected] | |
with: | |
type: 'zip' | |
filename: 'wristler.zip' | |
exclusions: '*.git* /*node_modules/* .editorconfig info.json DOCKER_ENV docker_tag Dockerfile-php-build output.log' | |
- name: Upload Release | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: "wristler.zip" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
replacesArtifacts: true | |
- name: Update info.json (Plugin version) | |
uses: jossef/[email protected] | |
with: | |
file: info.json | |
field: version | |
value: ${{ env.RELEASE_VERSION }} | |
- name: Update info.json (Updated date) | |
uses: jossef/[email protected] | |
with: | |
file: info.json | |
field: last_updated | |
value: ${{ env.RELEASE_DATE }} | |
- name: Update info.json (Download URL) | |
uses: jossef/[email protected] | |
with: | |
file: info.json | |
field: download_url | |
value: "https://github.com/wristler/wristler-wordpress-plugin/releases/download/v${{ env.RELEASE_VERSION }}/wristler.zip" | |
- name: Update WordPress information | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
git commit -am "Updated WordPress information (info.json)" | |
git push origin HEAD:main |