-
-
Notifications
You must be signed in to change notification settings - Fork 53
49 lines (45 loc) · 1.67 KB
/
gemfury-upload.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
49
name: Gemfury Artifact Upload
on:
release:
types: [published]
workflow_dispatch:
inputs:
release_tag:
description: Release tag
required: true
env:
RELEASES_URL: 'https://github.com/notion-enhancer/notion-repackaged/releases'
RELEASE_VERSION: "${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release_tag }}"
GEMFURY_PUSH_URL: 'push.fury.io/notion-repackaged/'
jobs:
strip-revision:
name: Strip revision from tag
runs-on: ubuntu-latest
steps:
- id: strip-revision
run: |
RELEASE_VERSION_REV_STRIPPED=$(echo $RELEASE_VERSION | sed 's/^v//')
echo "::set-output name=release_version_rev_stripped::$RELEASE_VERSION_REV_STRIPPED"
outputs:
release_version_rev_stripped: ${{ steps.strip-revision.outputs.release_version_rev_stripped }}
upload-artifacts:
name: Upload artifacts
runs-on: ubuntu-latest
needs: [strip-revision]
strategy:
max-parallel: 2
matrix:
package_type: [deb, rpm]
package_name: [notion-app, notion-app-enhanced]
include:
- package_type: deb
filename_format: '{0}_{1}_amd64.deb'
- package_type: rpm
filename_format: '{0}-{1}.x86_64.rpm'
steps:
- name: Reupload artifacts to Gemfury
env:
ASSET_FILENAME: ${{ format(matrix.filename_format, matrix.package_name, needs.strip-revision.outputs.release_version_rev_stripped) }}
run: |
curl -O -L ${RELEASES_URL}/download/${RELEASE_VERSION}/${ASSET_FILENAME}
curl -f -F package=@${ASSET_FILENAME} https://${{ secrets.GEMFURY_PUSH_TOKEN }}@${GEMFURY_PUSH_URL}