Skip to content

Commit

Permalink
Merge pull request #37 from Invertus/TEST-RELEASE
Browse files Browse the repository at this point in the history
Workflow added to create release and artifact
  • Loading branch information
arturas-bes authored Nov 8, 2021
2 parents 6e1942a + 9db88e8 commit 9534da7
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Steps needed to trigger a module build:
* Navigate to repository
* Create new release
* Add needed tag
##Github documentation for releases:
https://docs.github.com/en/[email protected]/repositories/releasing-projects-on-github/managing-releases-in-a-repository

34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: release
on:
release:
types: [ published, edited, updated, drafted]

jobs:
build_release:
name: build_release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: build
run: |
composer install --no-dev --optimize-autoloader --classmap-authoritative
composer dump-autoload --no-dev --optimize --classmap-authoritative
rm -rf .git
rm -rf .github
rm -rf tests
rm -rf vendor.zip
mkdir dpdbaltics
rsync -Rr ./ ./dpdbaltics
shopt -s extglob
rm -r !(dpdbaltics)
find . -maxdepth 1 -type f -exec rm "{}" \;
cd dpdbaltics && rm -rf dpdbaltics
cd ../ && zip -r dpdbaltics.zip dpdbaltics/
- name: Update Release
uses: johnwbyrd/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ./dpdbaltics.zip
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"repositories": [
{
"type": "git",
"url": "[email protected]:invertus/dpdbaltics-api.git"
"url": "https://github.com/Invertus/dpdbaltics-api.git"
},
{
"type": "git",
"url": "[email protected]:invertus/ps-module-tabs.git"
"url": "https://github.com/Invertus/ps-module-tabs.git"
}
],
"autoload": {
Expand Down

0 comments on commit 9534da7

Please sign in to comment.