Skip to content

Commit

Permalink
Fully implement tags_only release process (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbaldry authored Jan 28, 2025
1 parent a8183c4 commit b413f2d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions publish-technical-documentation-release/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ runs:
# Tags aren't necessarily made to the HEAD of the branch.
# The documentation to be published is always on the HEAD of the branch.
# However, if the repository only releases from tags, there's no release branch to check out.
if: github.ref_type == 'tag' && !inputs.tag_only
if: github.ref_type == 'tag' && !inputs.tags_only
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}
GITHUB_REF: ${{ github.ref }}
Expand All @@ -84,7 +84,8 @@ runs:
shell: bash

- name: Build website
uses: grafana/writers-toolkit/build-website@4b1248585248751e3b12fd020cf7ac91540ca09c # build-website/v1.0.1 with:
uses: grafana/writers-toolkit/build-website@4b1248585248751e3b12fd020cf7ac91540ca09c # build-website/v1.0.1
with:
source_directory: ${{ inputs.source_directory }}
website_directory: ${{ inputs.website_directory }}

Expand Down Expand Up @@ -121,6 +122,7 @@ runs:

- name: Determine if there is a matching release tag
id: has-matching-release-tag
if: github.ref_type != 'tag'
uses: ./actions/has-matching-release-tag
with:
ref_name: ${{ github.ref_name }}
Expand All @@ -129,14 +131,14 @@ runs:
release_tag_regexp: ${{ inputs.release_tag_regexp }}

- name: Determine technical documentation version
if: steps.has-matching-release-tag.outputs.bool == 'true'
if: github.ref_type == 'tag' || steps.has-matching-release-tag.outputs.bool == 'true'
uses: ./actions/docs-target
id: target
with:
ref_name: ${{ github.ref_name }}

- name: Sync to the website repository (release)
if: steps.has-matching-release-tag.outputs.bool == 'true'
if: github.ref_type == 'tag' || steps.has-matching-release-tag.outputs.bool == 'true'
uses: ./.github/actions/website-sync
id: publish-release
with:
Expand All @@ -149,7 +151,7 @@ runs:
allow_no_changes: ${{ inputs.allow_no_changes }}

- name: Print release outputs
if: steps.has-matching-release-tag.outputs.bool == 'true'
if: github.ref_type == 'tag' || steps.has-matching-release-tag.outputs.bool == 'true'
env:
COMMIT_HASH: ${{ steps.publish-release.outputs.commit_hash }}
WORKING_DIRECTORY: ${{ steps.publish-release.outputs.working_directory }}
Expand Down

0 comments on commit b413f2d

Please sign in to comment.