-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Related to femiwiki/femiwiki#200 (copied from https://github.com/femiwiki/.github/blob/242bbdb0/workflow-templates/extension-release.yml)
- Loading branch information
Showing
2 changed files
with
62 additions
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
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@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: '7.3' | ||
tools: composer:v1 | ||
- 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: | | ||
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": "${{ github.event.repository.name }}", | ||
"version": "${{ steps.tag_name.outputs.tag_name }}" | ||
} | ||
}' |
This file was deleted.
Oops, something went wrong.