forked from civicrm/civicrm-core
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
COMCL-569: Add patch workflow for version 5.75.0
- Loading branch information
Muhammad Shahrukh
committed
Jul 9, 2024
1 parent
b8e4b48
commit 417cd1b
Showing
1 changed file
with
60 additions
and
0 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,60 @@ | ||
name: Packaging | ||
on: | ||
push: | ||
branches: | ||
- 5.75.0-patches | ||
|
||
env: | ||
base_version: 5.75.0 | ||
|
||
jobs: | ||
build: | ||
name: Packaging | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Download Civi | ||
env: | ||
civi_package: civicrm-${{ env.base_version }}-drupal.tar.gz | ||
run: | | ||
cd .. | ||
pwd | ||
mkdir to-be-patched | ||
wget https://storage.googleapis.com/civicrm/civicrm-stable/${base_version}/${civi_package} | ||
tar xzf ./${civi_package} -C to-be-patched | ||
- name: Checkout the fork | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ env.base_version }} | ||
|
||
- name: Create patched package | ||
uses: compucorp/[email protected] | ||
id: "patch" | ||
with: | ||
base_version: ${{ env.base_version }} | ||
project_dir: '../to-be-patched/civicrm' | ||
project_name: 'civicrm' | ||
project_type: 'civicrm-core' | ||
|
||
- name: Create a new release | ||
id: create_release | ||
uses: compucorp/create-release@target_commitish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: "${{ steps.patch.outputs.version }}" | ||
target_commitish: "${{ github.sha }}" | ||
release_name: "${{ steps.patch.outputs.version }}" | ||
body: "${{ steps.patch.outputs.version }}" | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: "${{ steps.patch.outputs.package_path }}" | ||
asset_name: "${{ steps.patch.outputs.package }}" | ||
asset_content_type: application/gzip |