-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.34 KB
/
publish_features.yml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Release Unipept Index Feature
on:
push:
branches:
- main
workflow_dispatch:
jobs:
package-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Create tarball
run: |
mkdir -p release
tar -czf release/unipept-index.tar.gz -C unipept-index .
- name: Get current version
id: version
run: |
# Extract the current version from the feature's devcontainer-feature.json
version=$(jq -r '.version' < unipept-index/devcontainer-feature.json)
echo "version=$version" >> $GITHUB_ENV
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: v${{ env.version }}
release_name: Release ${{ env.version }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: release/unipept-index.tar.gz
asset_name: devcontainer-feature-unipept-index.tgz
asset_content_type: application/gzip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}