From 83422d324b5936bfc024212f7567d26d693e6b0c Mon Sep 17 00:00:00 2001 From: antheas Date: Sat, 6 Apr 2024 10:21:20 +0200 Subject: [PATCH] add nobara publishing --- .github/workflows/package-publish.yml | 26 +++++++++++++++++++++ .github/workflows/publish-nobara.yml | 33 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/publish-nobara.yml diff --git a/.github/workflows/package-publish.yml b/.github/workflows/package-publish.yml index 882c4cc..5e630d3 100644 --- a/.github/workflows/package-publish.yml +++ b/.github/workflows/package-publish.yml @@ -79,3 +79,29 @@ jobs: SKIP_EMPTY_COMMITS: true # Do not clear any files CLEAR_GLOBS_FILE: .github/workflows/copr_glob.txt + + deploy_nobara: + runs-on: ubuntu-latest + environment: prod + needs: deploy_pypi + + steps: + - uses: actions/checkout@v3 + - name: Create spec file dir + run: mkdir -p ./pkg/ + - name: Build spec file + run: sed "s/REPLACE_VERSION/$(cat pyproject.toml | grep -E 'version = "[0-9\.]+"' -o | grep -E "[0-9\.]+" -o)/" adjustor.spec > ./pkg/adjustor.spec + - name: Rename to Nobara ver + run: >- + sed "s/Name: adjustor/Name: hhd-adjustor/" adjustor.spec > ./pkg/adjustor.spec + - name: Publish to COPR repo + uses: s0/git-publish-subdir-action@develop + env: + REPO: git@github.com:hhd-dev/adjustor-nobara.git + BRANCH: main + FOLDER: pkg + SSH_PRIVATE_KEY: ${{ secrets.NOBARA_SSH_PRIVATE_KEY }} + MESSAGE: update to '${{ github.event.release.name }}' + SKIP_EMPTY_COMMITS: true + # Do not clear any files + CLEAR_GLOBS_FILE: .github/workflows/copr_glob.txt diff --git a/.github/workflows/publish-nobara.yml b/.github/workflows/publish-nobara.yml new file mode 100644 index 0000000..74bd6e4 --- /dev/null +++ b/.github/workflows/publish-nobara.yml @@ -0,0 +1,33 @@ +name: Publish to Nobara + +on: + workflow_dispatch: + +permissions: + contents: read + +jobs: + deploy_nobara: + runs-on: ubuntu-latest + environment: prod + + steps: + - uses: actions/checkout@v3 + - name: Create spec file dir + run: mkdir -p ./pkg/ + - name: Build spec file + run: sed "s/REPLACE_VERSION/$(cat pyproject.toml | grep -E 'version = "[0-9\.]+"' -o | grep -E "[0-9\.]+" -o)/" adjustor.spec > ./pkg/adjustor.spec + - name: Rename to Nobara ver + run: >- + sed "s/Name: adjustor/Name: hhd-adjustor/" adjustor.spec > ./pkg/adjustor.spec + - name: Publish to COPR repo + uses: s0/git-publish-subdir-action@develop + env: + REPO: git@github.com:hhd-dev/adjustor-nobara.git + BRANCH: main + FOLDER: pkg + SSH_PRIVATE_KEY: ${{ secrets.NOBARA_SSH_PRIVATE_KEY }} + MESSAGE: update to '${{ github.event.release.name }}' + SKIP_EMPTY_COMMITS: true + # Do not clear any files + CLEAR_GLOBS_FILE: .github/workflows/copr_glob.txt \ No newline at end of file