Skip to content

Commit 30132c5

Browse files
committed
3187: Added automatic deployment
1 parent 00ea548 commit 30132c5

File tree

3 files changed

+71
-2
lines changed

3 files changed

+71
-2
lines changed

.github/workflows/build_release.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
on:
2+
push:
3+
tags:
4+
- '*.*.*'
5+
6+
name: Create Github Release
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
create-release:
13+
runs-on: ubuntu-latest
14+
env:
15+
COMPOSER_ALLOW_SUPERUSER: 1
16+
APP_ENV: prod
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Composer install
22+
run: |
23+
docker network create frontend
24+
docker compose run --rm --user=root -e APP_ENV=prod phpfpm composer install --no-dev --optimize-autoloader
25+
docker compose run --rm --user=root -e APP_ENV=prod phpfpm composer clear-cache
26+
27+
- name: Make assets dir
28+
run: |
29+
mkdir -p ../assets
30+
31+
- name: Create archive
32+
run: |
33+
sudo chown -R runner:runner ./
34+
tar --exclude='.git' -zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./
35+
36+
- name: Create checksum
37+
run: |
38+
cd ../assets
39+
sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt
40+
41+
- name: Create a release in GitHub and uploads assets
42+
run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.*
43+
env:
44+
GITHUB_TOKEN: ${{ github.TOKEN }}
45+
shell: bash

.woodpecker/deployment.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
when:
2+
- event: release
3+
4+
skip_clone: true
5+
6+
steps:
7+
- name: Ansible playbook
8+
image: itkdev/ansible-plugin:1
9+
pull: true
10+
settings:
11+
id:
12+
from_secret: id
13+
secret:
14+
from_secret: secret
15+
host:
16+
from_secret: host
17+
path:
18+
from_secret: path
19+
user:
20+
from_secret: user
21+
playbook: 'release'
22+
pre_up:
23+
- itkdev-docker-compose-server run --rm phpfpm bin/console cache:clear

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ See [keep a changelog] for information about writing changes to this log.
88

99
## [Unreleased]
1010

11-
## [1.0.0] - 2024-09-11
11+
## [1.0.0] - 2024-12-13
1212

1313
### Added
1414

@@ -28,4 +28,5 @@ See [keep a changelog] for information about writing changes to this log.
2828
- Added multi-value filtering for Lactions and Organizations
2929

3030
[keep a changelog]: https://keepachangelog.com/en/1.1.0/
31-
[unreleased]: https://github.com/itk-dev/event-database-imports/compare/main...develop
31+
[unreleased]: https://github.com/itk-dev/event-database-api/compare/main...develop
32+
[1.0.0]: https://github.com/itk-dev/event-database-api/releases/tag/1.0.0

0 commit comments

Comments
 (0)