Skip to content

Fix parse error

Fix parse error #28

# If you see this message on 'femiwiki/.github' repository, please keep in mind that all changes of
# this workflow file is for being copied to other repositories. If you see this message on any other
# repositories, DO NOT EDIT this file itself. You should edit
# https://github.com/femiwiki/.github/blob/main/workflow-templates/.github/workflows/release-and-submit.yml
# Instead of this.
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Upload Release Asset and submit a PR to docker-mediawiki repository
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
tools: composer:v1
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Set tag name
id: tag_name
run: echo "::set-output name=tag_name::$(basename ${{ github.ref }})"
- name: Build project
run: |
composer update --no-dev
yarn --prod
tar --exclude-vcs -C .. -zcvf "../${{ steps.tag_name.outputs.tag_name }}.tar.gz" "$(basename "$(pwd)")"
mv ../${{ steps.tag_name.outputs.tag_name }}.tar.gz ./
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ steps.tag_name.outputs.tag_name }}.tar.gz
asset_name: ${{ steps.tag_name.outputs.tag_name }}.tar.gz
asset_content_type: application/zip
- name: Submit a PR
run: |
if [ '${{ github.event.repository.name }}' = 'FemiwikiSkin' ]; then
EXTENSION=Femiwiki
else
EXTENSION=${{ github.event.repository.name }}
fi
curl \
--fail \
--request POST \
--url https://api.github.com/repos/femiwiki/docker-mediawiki/dispatches \
--header "Authorization: token ${{ secrets.BOT_TOKEN }}" \
--header 'content-type: application/json' \
--data "{
\"event_type\": \"bump-extension\",
\"client_payload\": {
\"extension\": \"$EXTENSION\",
\"version\": \"${{ steps.tag_name.outputs.tag_name }}\"
}
}"