Skip to content

Commit 9de0b82

Browse files
committed
Add workflow for gemfury upload of deb and rpm packages
1 parent ef21a85 commit 9de0b82

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Gemfury Artifact Upload
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
workflow_dispatch:
8+
inputs:
9+
release_tag:
10+
description: Release tag
11+
required: true
12+
env:
13+
RELEASES_URL: 'https://github.com/notion-enhancer/notion-repackaged/releases'
14+
RELEASE_VERSION: "${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release_tag }}"
15+
GEMFURY_PUSH_URL: 'push.fury.io/notion-repackaged/'
16+
17+
jobs:
18+
strip-revision:
19+
name: Strip revision from tag
20+
runs-on: ubuntu-latest
21+
steps:
22+
- id: strip-revision
23+
run: |
24+
RELEASE_VERSION_REV_STRIPPED=$(echo $RELEASE_VERSION | sed 's/^v//')
25+
echo "::set-output name=release_version_rev_stripped::$RELEASE_VERSION_REV_STRIPPED"
26+
outputs:
27+
release_version_rev_stripped: ${{ steps.strip-revision.outputs.release_version_rev_stripped }}
28+
29+
upload-artifacts:
30+
name: Upload artifacts
31+
runs-on: ubuntu-latest
32+
needs: [strip-revision]
33+
strategy:
34+
fail-fast: true
35+
max-parallel: 2
36+
matrix:
37+
package_type: [deb, rpm]
38+
package_name: [notion-app, notion-app-enhanced]
39+
include:
40+
- package_type: deb
41+
filename_format: '{0}_{1}_amd64.deb'
42+
- package_type: rpm
43+
filename_format: '{0}-{1}.x86_64.rpm'
44+
steps:
45+
- name: Reupload artifacts to Gemfury
46+
env:
47+
ASSET_FILENAME: ${{ format(matrix.filename_format, matrix.package_name, needs.strip-revision.outputs.release_version_rev_stripped) }}
48+
run: |
49+
curl -O -L ${RELEASES_URL}/download/${RELEASE_VERSION}/${ASSET_FILENAME}
50+
curl -f -F package=@${ASSET_FILENAME} https://${{ secrets.GEMFURY_PUSH_TOKEN }}@${GEMFURY_PUSH_URL}

0 commit comments

Comments
 (0)