27
27
# This is needed so we can determine the commits (and therefore PRs)
28
28
# where the changelogs have been added
29
29
fetch-depth : 0
30
+ # By default, the github.token is used and stored in the Git config,
31
+ # This would override any authentication provided in the URL,
32
+ # which we do later to push to a fork.
33
+ # So we need to prevent that from being stored.
34
+ persist-credentials : false
30
35
31
36
- uses : cachix/install-nix-action@v26
32
37
36
41
version=$(result/bin/auto-version . ${{ github.event.pull_request.number || '' }})
37
42
git config user.name ${{ github.actor }}
38
43
git config user.email ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
39
- git commit --all --message "Version $version
44
+ git add --all
45
+ git commit --message "Version $version
40
46
41
47
Automated release"
42
48
@@ -45,15 +51,20 @@ jobs:
45
51
GH_TOKEN : ${{ github.token }}
46
52
47
53
- name : Outputting draft release notes
54
+ # If we have a new version at all (it's not an empty string)
55
+ # And it's not a push event (so it's a PR),
48
56
if : ${{ env.version && github.event_name != 'push' }}
57
+ # we just output the draft changelog into the step summary
49
58
run : cat changes/released/${{ env.version }}.md > "$GITHUB_STEP_SUMMARY"
50
59
51
60
- name : Update release branch
52
- # if: ${{ env.version && github.event_name == 'push' }}
61
+ # But if this is a push te the main branch,
62
+ if : ${{ env.version && github.event_name == 'push' }}
63
+ # we push to the release branch.
53
64
# This continuously updates the release branch to contain the latest release notes,
54
65
# so that one can just merge the release branch into main to do a release.
55
66
# A PR to do that is opened regularly with another workflow
56
- run : git push origin HEAD:refs/heads/release -f
67
+ run : git push https://${{ secrets.MACHINE_USER_PAT }}@github.com/infinixbot/nixpkgs-check-by-name.git HEAD:refs/heads/release -f
57
68
58
69
59
70
test-update :
0 commit comments