Extend README.md and do some minor fixed #25
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: Build and release | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
SLUG: "enwikuna-license-manager-client" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
uses: php-actions/composer@v6 | |
with: | |
php_version: '7.4' | |
php_extensions: zip | |
dev: no | |
- name: Create prepack folder | |
run: | | |
rm -rf ../prepack/$SLUG | |
mkdir -p ../prepack/$SLUG | |
- name: Copy content to prepack folder | |
run: rsync -rav --exclude=".*" --exclude="composer.*" --exclude="[dD][oO][cC][kK][eE][rR]*" --exclude="output.log" --exclude="phpcs.xml" --exclude="__MACOSX" . ../prepack/$SLUG | |
- name: Create release ZIP artifact | |
run: | | |
cd ../prepack | |
zip -r ../$SLUG/$SLUG.zip $SLUG | |
cd ../$SLUG | |
- name: Upload release ZIP artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.SLUG }}.zip | |
path: ${{ github.workspace }}/${{ env.SLUG }}.zip | |
release: | |
name: Release | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download release ZIP artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: ${{ env.SLUG }}.zip | |
path: ${{ github.workspace }} | |
- name: Create GitHub release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: ${{ github.ref_name }} | |
body: "Release ${{ github.ref_name }} of Enwikuna License Manager Client" | |
draft: false | |
- name: Upload release assets | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ github.workspace }}/${{ env.SLUG }}.zip | |
asset_name: ${{ env.SLUG }}.zip | |
asset_content_type: application/zip |