Skip to content

Commit

Permalink
separate release-fedora from release-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
filfreire committed Jan 16, 2023
1 parent 1aa7995 commit 71a919e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 31 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release-fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release Fedora

on:
workflow_dispatch:
inputs:
version:
required: true
description: Release version (e.g. 2022.1.0 or 2022.1.0-beta.0)

env:
RELEASE_CORE_TAG: core@${{ github.event.inputs.version }}
IS_PRERELEASE: ${{ contains(github.event.inputs.version, 'alpha') || contains(github.event.inputs.version, 'beta') }}

jobs:
release-fedora:
runs-on: ubuntu-latest
steps:
- name: Checkout branch # Check out the release branch
uses: actions/checkout@v3
with:
ref: ${{ env.RELEASE_CORE_TAG }}
fetch-depth: 0
persist-credentials: false

- name: Build Insomnia from sources for Fedora
run: |
docker build --tag fedora-insomnia-builder:latest -f fedora.Dockerfile .
docker create --name builder fedora-insomnia-builder:latest
docker cp builder:/insomnia/packages/insomnia/dist/. ./artifacts/
docker rm -f builder
- name: Upload artifacts to release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.publish.outputs.release_id }}
tag_name: ${{ env.RELEASE_CORE_TAG }}
file: "./artifacts/**.rpm"
prerelease: ${{ env.IS_PRERELEASE }}
draft: false
31 changes: 0 additions & 31 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ env:
jobs:
publish:
runs-on: ubuntu-latest
outputs:
release_id: ${{ steps.core_tag_and_release.outputs.id }}
steps:
- name: Checkout branch # Check out the release branch
uses: actions/checkout@v3
Expand Down Expand Up @@ -220,32 +218,3 @@ jobs:
git push "${remote_repo}"
env:
RELEASE_GH_TOKEN: ${{ secrets.RELEASE_GH_TOKEN }}

publish-fedora:
needs: publish
runs-on: ubuntu-latest
steps:
- name: Checkout branch # Check out the release branch
uses: actions/checkout@v3
with:
ref: ${{ env.RELEASE_BRANCH }}
fetch-depth: 0
persist-credentials: false

- name: Build Insomnia from sources for Fedora
run: |
docker build --tag fedora-insomnia-builder:latest -f fedora.Dockerfile .
docker create --name builder fedora-insomnia-builder:latest
docker cp builder:/insomnia/packages/insomnia/dist/. ./artifacts/
docker rm -f builder
- name: Upload artifacts to release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.publish.outputs.release_id }}
tag_name: ${{ env.RELEASE_CORE_TAG }}
file: "./artifacts/**.rpm"
prerelease: ${{ env.IS_PRERELEASE }}
draft: false

0 comments on commit 71a919e

Please sign in to comment.