-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 2.72 KB
/
part-release.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: perform gitlab release
on:
workflow_call:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: download target directory
uses: actions/download-artifact@v4
with:
name: target
path: target
- name: changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v5
with:
output-file: "false"
skip-version-file: "true"
skip-on-empty: "false"
skip-commit: "true"
- name: TGZ up the release
run: mkdir release && mkdir release/mediatheken-dlna-bridge-${{ steps.changelog.outputs.version }} && cp -r target/*.jar target/libraries release/mediatheken-dlna-bridge-${{ steps.changelog.outputs.version }} && cd release && tar cvfz mediatheken-dlna-bridge-${{ steps.changelog.outputs.version }}.tar.gz mediatheken-dlna-bridge-${{ steps.changelog.outputs.version }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
draft: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: release/mediatheken-dlna-bridge-${{ steps.changelog.outputs.version }}.tar.gz
asset_name: mediatheken-dlna-bridge-${{ steps.changelog.outputs.version }}.tar.gz
asset_content_type: application/tar+gzip
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
corelogicsde/mediatheken-dlna-bridge:latest
corelogicsde/mediatheken-dlna-bridge:${{ steps.changelog.outputs.version }}