-
Notifications
You must be signed in to change notification settings - Fork 1
Add build release jobs to standard github actions #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
turegjorup
wants to merge
6
commits into
develop
Choose a base branch
from
feature/add_release_build_actions
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
60eae57
Add build release jobs to standard github actions
turegjorup 50ca625
yaml lint
turegjorup 9ee35ea
Update templates/drupal-11/.github/workflows/build_release.yml
turegjorup e99ef11
Update templates/drupal-11/.github/workflows/build_release.yml
turegjorup 6cae07e
Remove redundant env values. Don't run as root
turegjorup 7647dcd
yaml lint
turegjorup File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,51 @@ | ||
| on: | ||
| push: | ||
| tags: | ||
| - "*.*.*" | ||
|
|
||
| name: Create Github Release | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| env: | ||
| COMPOSE_USER: runner | ||
|
|
||
| jobs: | ||
| create-release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Composer install | ||
| run: | | ||
| docker network create frontend | ||
| docker compose run --rm phpfpm composer install --no-dev --classmap-authoritative | ||
| docker compose run --rm phpfpm composer clear-cache | ||
| - name: Build additional assets | ||
| # Build any additional assets here | ||
| run: | | ||
| # docker compose run --rm node npm --prefix /app/web/themes/custom/site-theme install | ||
| # docker compose run --rm node npm --prefix /app/web/themes/custom/site-theme run build | ||
| # docker compose run --rm node rm -fr /app/web/themes/custom/site-theme/node_modules | ||
|
|
||
| - name: Make assets dir | ||
| run: | | ||
| mkdir -p ../assets | ||
|
|
||
| - name: Create archive | ||
| run: | | ||
| sudo chown -R runner:runner ./ | ||
| tar --exclude='.git' -zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./ | ||
|
|
||
| - name: Create checksum | ||
| run: | | ||
| cd ../assets | ||
| sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt | ||
|
|
||
| - name: Create a release in GitHub and uploads assets | ||
| run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.* | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.TOKEN }} | ||
| shell: bash | ||
This file contains hidden or 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,45 @@ | ||
| on: | ||
| push: | ||
| tags: | ||
| - "*.*.*" | ||
|
|
||
| name: Create Github Release | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| env: | ||
| COMPOSE_USER: runner | ||
|
|
||
| jobs: | ||
| create-release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Composer install | ||
| run: | | ||
| docker network create frontend | ||
| docker compose run --rm -e APP_ENV=prod phpfpm composer install --no-dev --optimize-autoloader | ||
| docker compose run --rm -e APP_ENV=prod phpfpm composer clear-cache | ||
|
|
||
| - name: Make assets dir | ||
| run: | | ||
| mkdir -p ../assets | ||
|
|
||
| - name: Create archive | ||
| run: | | ||
| sudo chown -R runner:runner ./ | ||
| tar --exclude='.git' -zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./ | ||
|
|
||
| - name: Create checksum | ||
| run: | | ||
| cd ../assets | ||
| sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt | ||
|
|
||
| - name: Create a release in GitHub and uploads assets | ||
| run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.* | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.TOKEN }} | ||
| shell: bash |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.