-
Notifications
You must be signed in to change notification settings - Fork 2
32 lines (32 loc) · 1.14 KB
/
create-package.yml
File metadata and controls
32 lines (32 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: create-package
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
create-package:
runs-on: ubuntu-latest
env:
REPOSITORY_NAME: ${{ github.event.repository.name }}
TAG_NAME: ${{ github.ref_name }}
steps:
- name: Create archive name
run: |
PLUGIN_NAME=$(echo $REPOSITORY_NAME | sed -e 's/^.*-//')
echo "PLUGIN_NAME=$PLUGIN_NAME" >> $GITHUB_ENV
echo "ARCHIVE_NAME=$PLUGIN_NAME-$TAG_NAME" >> $GITHUB_ENV
- name: Get files into context
uses: actions/checkout@v3
- name: Create archive
run: |
tar --transform "s%^%$PLUGIN_NAME/%" --show-transformed -zcvf "$ARCHIVE_NAME".tar.gz ajax front inc locales sql dataflows.png *.xml *.php LICENSE README.md INSTALL.md
- name: Upload tarfile to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{env.ARCHIVE_NAME}}.tar.gz
tag: ${{env.TAG_NAME}}
overwrite: true
prerelease: false
release_name: ${{github.event.release.name}}
body: ${{github.event.release.body}}