]> git.mxchange.org Git - friendica-addons.git/blob - .woodpecker/.releaser.yml
„audon/messages.po“ löschen
[friendica-addons.git] / .woodpecker / .releaser.yml
1 # This prevents executing this pipeline at other servers than ci.friendi.ca
2 labels:
3   location: friendica
4   type: releaser
5
6 skip_clone: true
7
8 pipeline:
9   clone_friendica_base:
10     image: alpine/git
11     commands:
12       - git clone https://github.com/friendica/friendica.git .
13       - git checkout $CI_COMMIT_BRANCH
14     when:
15       repo: friendica/friendica-addons
16       event: tag
17   clone_friendica_addon:
18     image: alpine/git
19     commands:
20       - git config --global user.email "no-reply@friendi.ca"
21       - git config --global user.name "Friendica"
22       - git clone $CI_REPO_LINK addon
23       - cd addon/
24       - git checkout $CI_COMMIT_BRANCH
25       - git fetch origin $CI_COMMIT_REF
26       - git merge $CI_COMMIT_SHA
27     when:
28       repo: friendica/friendica-addons
29       event: tag
30   restore_cache:
31     image: meltwater/drone-cache:dev
32     settings:
33       backend: "filesystem"
34       restore: true
35       cache_key: "{{ .Repo.Name }}_php7.4_{{ arch }}_{{ os }}"
36       archive_format: "gzip"
37       mount:
38         - '.composer'
39     volumes:
40       - /tmp/drone-cache:/tmp/cache
41     when:
42       repo: friendica/friendica-addons
43       event: tag
44   composer_install:
45     image: friendicaci/php7.4:php7.4.33
46     commands:
47       - export COMPOSER_HOME=.composer
48       - composer validate
49       - composer install --no-dev --optimize-autoloader
50     when:
51       repo: friendica/friendica-addons
52       event: tag
53     volumes:
54       - /etc/hosts:/etc/hosts
55   create_artifacts:
56     image: debian
57     commands:
58       - apt-get update
59       - apt-get install bzip2
60       - mkdir ./build
61       - export VERSION="$(cat VERSION)"
62       - export RELEASE="friendica-addons-$VERSION"
63       - export ARTIFACT="$RELEASE.tar.gz"
64       - tar
65         --exclude='.tx'
66         --exclude='.git'
67         --exclude='.editorconfig'
68         --exclude='.gitattributes'
69         --exclude='.gitignore'
70         --exclude='.woodpecker'
71         --exclude='**/*/messages.po'
72         -cvzf ./build/$ARTIFACT addon/
73       - cd ./build
74       - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256"
75       - chmod 664 ./*
76       - ls -lh
77       - cat "$ARTIFACT.sum256"
78       - sha256sum "$ARTIFACT"
79     when:
80       repo: friendica/friendica-addons
81       event: tag
82   sign_artifacts:
83     image: plugins/gpgsign
84     settings:
85       key:
86         from_secret: gpg_key
87       passphrase:
88         from_secret: gpg_password
89       files:
90         - build/*
91       exclude:
92         - build/*.sum256
93       detach_sign: true
94     when:
95       repo: friendica/friendica-addons
96       event: tag
97   publish_artifacts:
98     image: alpine
99     commands:
100       - cp -fr build/* /tmp/friendica_files/
101     volumes:
102       - files:/tmp/friendica_files
103     when:
104       repo: friendica/friendica-addons
105       event: tag