From 332b93421b8b0fe6baaa4ccf3a2e43a7b9cf0572 Mon Sep 17 00:00:00 2001 From: FroggyFlox Date: Mon, 3 Jul 2023 12:10:04 -0400 Subject: [PATCH] Add GitHub Action workflow to create release post rockstor-core release We currently manually create a new release of rockstor-jslibs every time a release in rockstor-core is made; as required by our rockstor-rpmbuild process. This commit creates a GitHub Action workflow to automatically do that; this workflow is meant to be triggered by a parent workflow present in rockstor-core. This commit also includes a .gitattributes file to exclude git and GitHub config files from the tarball of assets automatically created upon release creation. --- .gitattributes | 5 +++++ .github/workflows/update_release.yml | 33 ++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .gitattributes create mode 100644 .github/workflows/update_release.yml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..538d17e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Exclude git config files from the generated tarball +.git* export-ignore + +# Exclude .github files +.github/** export-ignore diff --git a/.github/workflows/update_release.yml b/.github/workflows/update_release.yml new file mode 100644 index 0000000..d5aca4b --- /dev/null +++ b/.github/workflows/update_release.yml @@ -0,0 +1,33 @@ +name: Create release +on: + workflow_dispatch: + inputs: + version: + required: true + description: version without release + type: string + target_branch: + required: true + description: branch to target when creating the release + type: string +jobs: + create-release: + name: Create a release based on version received + runs-on: ubuntu-latest + permissions: + contents: write + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout jslibs + id: checkout-jslibs + uses: actions/checkout@v3 + with: + ref: ${{ inputs.target_branch }} + - name: Create release on rockstor/rockstor-jslibs + id: create-jslibs-release + run: | + gh release create ${{ inputs.version }} \ + --notes "Tagging for next rockstor-core release." \ + --title "${{ inputs.version }}" \ + --target ${{ inputs.target_branch }}