-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create Release Action This action should bundle things up and create a draft release with every version * gitignore Add a gitignore to ignore the various magento related stuff * Add zip files to ignore
- Loading branch information
1 parent
dafc678
commit 2295c26
Showing
2 changed files
with
78 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,66 @@ | ||
name: Create Release on Tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
release: | ||
name: Create Release and Upload Assets | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up version and release name | ||
id: vars | ||
run: | | ||
TAG_NAME=${GITHUB_REF#refs/tags/} | ||
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV | ||
echo "RELEASE_NAME=${TAG_NAME}" >> $GITHUB_ENV | ||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: ${{ env.TAG_NAME }} | ||
release_name: ${{ env.RELEASE_NAME }} | ||
draft: true | ||
prerelease: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Zip the entire repository directory | ||
run: zip -r source-${{ env.TAG_NAME }}.zip . | ||
|
||
- name: Tar the entire repository directory | ||
run: tar -czvf source-${{ env.TAG_NAME }}.tar.gz . | ||
|
||
- name: Zip the Api directory | ||
run: zip -r Auctane_Api-${{ env.TAG_NAME }}.zip Api | ||
|
||
- name: Upload source zip file | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./source-${{ env.TAG_NAME }}.zip | ||
asset_name: source-${{ env.TAG_NAME }}.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload source tar.gz file | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./source-${{ env.TAG_NAME }}.tar.gz | ||
asset_name: source-${{ env.TAG_NAME }}.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload Api zip file | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./Auctane_Api-${{ env.TAG_NAME }}.zip | ||
asset_name: Auctane_Api-${{ env.TAG_NAME }}.zip | ||
asset_content_type: application/zip |
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,12 @@ | ||
/vendor/ | ||
/node_modules/ | ||
/generated/ | ||
/var/ | ||
/pub/static/ | ||
/app/etc/config.php | ||
/app/etc/env.php | ||
/coverage/ | ||
.idea/ | ||
.DS_Store | ||
*.zip | ||
*.tar.gz |