Skip to content

Commit

Permalink
Remove the redundant GitHub Workflow Jobs
Browse files Browse the repository at this point in the history
Remove the redundant GitHub Workflow Jobs which used to update both
action.yaml and README.md during drafts and releases now that the GitHub
Action uses dynamic information to launch itself.
  • Loading branch information
jonathanio committed May 21, 2023
1 parent 45a3e92 commit 57d31a5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,3 @@ jobs:
with:
config-name: release-drafter.yaml
disable-autolabeler: true

- name: Prepare the published tag reference
run: |-
sed -i 's|\(scripts/run\) \(v[0-9\.]\+\)$|\1 ${{ steps.drafter.output.id }}|' action.yaml
- name: Commit the published tag update
run: |-
if git diff --exit-code --quiet action.yaml
echo "No changes to action.yaml need to be committed for the release."
exit 0
fi
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add action.yaml
git commit --no-verify \
-m "Update tag in GitHub Action to prepare for release" \
-m "Update the published tag to ${{ steps.drafter.output.id }} to prepare the GitHub Action for release."
git push
30 changes: 0 additions & 30 deletions .github/workflows/go-releaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,36 +53,6 @@ jobs:
version: latest
args: release --clean

update-documentation:
name: Update the Documentation
runs-on: ubuntu-latest
needs:
- goreleaser
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Fetch the tags
run: git fetch --force --tags

- name: Update the documentation tag reference
run: |-
sed -i 's|\(uses: n3tuk/pull-requester\)@\([v[0-9\.]\+\)$|\1@${{ github.ref_name }}|' README.md
- name: Commit the documentation tag update
run: |-
if git diff --exit-code --quiet README.md
echo "No changes to README.md need to be committed due to a release."
exit 0
fi
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add README.md
git commit --no-verify \
-m "Update the GitHub Action tag to ${{ github.ref_name }} in README" \
-m "Update the version tag for the GitHub Action in the README to ${{ steps.drafter.outputs.id }}\nto account for the latest release."
git push
update-tags:
name: Update Major/Minor Tags
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

steps:
- name: Pull Requester
uses: n3tuk/action-pull-requester@v1.0.0
uses: n3tuk/action-pull-requester@v1
```
> **Note**:
Expand Down

0 comments on commit 57d31a5

Please sign in to comment.