From 3232b641f655f60216630ac0fb52a53dc18388de Mon Sep 17 00:00:00 2001 From: Justin Stephenson Date: Thu, 11 May 2023 11:38:06 -0400 Subject: [PATCH] Automate the release process --- .github/workflows/release.yml | 34 +++++++++++++++++++++++++++++ .github/workflows/template-sync.yml | 19 ---------------- packit.yaml | 26 +++++++++++----------- 3 files changed, 47 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/template-sync.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4f33c66 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +# Create a GitHub upstream release. Replace "TARNAME" with your project tarball +# name and enable this by dropping the ".disabled" suffix from the file name. +# See README.md. +name: release +on: + push: + tags: + # this is a glob, not a regexp + - '[0-9]*' +jobs: + source: + runs-on: ubuntu-latest + container: + image: ghcr.io/cockpit-project/unit-tests + options: --user root + permissions: + # create GitHub release + contents: write + steps: + - name: Clone repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Workaround for https://github.com/actions/checkout/pull/697 + run: git fetch --force origin $(git describe --tags):refs/tags/$(git describe --tags) + + - name: Build release + run: make dist + + - name: Publish GitHub release + uses: cockpit-project/action-release@88d994da62d1451c7073e26748c18413fcdf46e9 + with: + filename: "TARNAME-${{ github.ref_name }}.tar.xz" diff --git a/.github/workflows/template-sync.yml b/.github/workflows/template-sync.yml deleted file mode 100644 index e719975..0000000 --- a/.github/workflows/template-sync.yml +++ /dev/null @@ -1,19 +0,0 @@ -# File: .github/workflows/template-sync.yml - -on: - schedule: - - cron: "0 0 1 * *" - workflow_dispatch: -jobs: - repo-sync: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v0.8.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - source_repo_path: cockpit-project/starter-kit - upstream_branch: main diff --git a/packit.yaml b/packit.yaml index f892b10..30bf483 100644 --- a/packit.yaml +++ b/packit.yaml @@ -53,18 +53,18 @@ jobs: # - centos-stream-9-x86_64 # Build releases in Fedora: https://packit.dev/docs/configuration/#propose_downstream - #- job: propose_downstream - # trigger: release - # dist_git_branches: - # - fedora-all + - job: propose_downstream + trigger: release + dist_git_branches: + - fedora-all - #- job: koji_build - # trigger: commit - # dist_git_branches: - # - fedora-all + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all - #- job: bodhi_update - # trigger: commit - # dist_git_branches: - # # rawhide updates are created automatically - # - fedora-branched + - job: bodhi_update + trigger: commit + dist_git_branches: + # rawhide updates are created automatically + - fedora-branched