Skip to content

Commit eca2d7c

Browse files
authored
switch to using main branch in actions (#694)
1 parent 15cfe20 commit eca2d7c

7 files changed

Lines changed: 28 additions & 28 deletions

File tree

.github/workflows/cherrypick.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
echo "BRANCH=$([ -n "${{ inputs.branch }}" ] && echo "${{ inputs.branch }}" || echo "${{ github.ref_name }}")" >> "$GITHUB_ENV"
3030
3131
- name: Check for protected branch
32-
if: ${{ env.BRANCH == 'master' }}
32+
if: ${{ env.BRANCH == 'main' }}
3333
run: |
3434
echo "Cannot cherry pick to protected branch"
3535
exit 1

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ name: "CodeQL"
1414

1515
on: # yamllint disable-line rule:truthy
1616
push:
17-
branches: [master, release-*]
17+
branches: [main, release-*]
1818
pull_request:
1919
# The branches below must be a subset of the branches above
20-
branches: [master, release-*]
20+
branches: [main, release-*]
2121
schedule:
2222
- cron: "15 19 * * 1"
2323

.github/workflows/linter.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Lint Codebase
33

44
on: # yamllint disable-line rule:truthy
55
push:
6-
branches: [master, release/**, patch/**]
6+
branches: [main, release/**, patch/**]
77
pull_request:
8-
branches: [master, release/**, patch/**]
8+
branches: [main, release/**, patch/**]
99

1010
permissions:
1111
contents: read

.github/workflows/maven-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Java CI with Maven
33

44
on: # yamllint disable-line rule:truthy
55
push:
6-
branches: [master, release/**, patch/**]
6+
branches: [main, release/**, patch/**]
77
pull_request:
8-
branches: [master, release/**, patch/**]
8+
branches: [main, release/**, patch/**]
99

1010
jobs:
1111
build:
@@ -93,7 +93,7 @@ jobs:
9393
"type": "section",
9494
"text": {
9595
"type": "mrkdwn",
96-
"text": "emissary-master -- Commit: <${{ github.event.pull_request.html_url || github.event.head_commit.url }}|${{ github.sha }}> merged by ${{ github.actor }}.\nCI Job Status: *${{ join(needs.*.result, ' ')}}*"
96+
"text": "emissary-main -- Commit: <${{ github.event.pull_request.html_url || github.event.head_commit.url }}|${{ github.sha }}> merged by ${{ github.actor }}.\nCI Job Status: *${{ join(needs.*.result, ' ')}}*"
9797
}
9898
}
9999
]

.github/workflows/maven-release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Check release is using correct branch
33-
if: ${{ github.event.inputs.release_type == 'release' && github.ref_name != 'master' }}
33+
if: ${{ github.event.inputs.release_type == 'release' && github.ref_name != 'main' }}
3434
run: |
35-
echo "Release is not using the correct branch, please target 'master'"
35+
echo "Release is not using the correct branch, please target 'main'"
3636
exit 1
3737
- name: Check milestone release type is using correct branch
38-
if: ${{ github.event.inputs.release_type == 'milestone' && github.ref_name != 'master' }}
38+
if: ${{ github.event.inputs.release_type == 'milestone' && github.ref_name != 'main' }}
3939
run: |
40-
echo "Milestone release is not using the correct branch, please target 'master'"
40+
echo "Milestone release is not using the correct branch, please target 'main'"
4141
exit 1
4242
- name: Check milestone has release suffix
4343
if: ${{ github.event.inputs.release_type == 'milestone' && github.event.inputs.release_suffix == '' }}
@@ -143,7 +143,7 @@ jobs:
143143
run: git push origin :${{ github.ref_name }}
144144

145145
snapshot-bump:
146-
if: ${{ github.event.inputs.release_type == 'release' && github.ref_name == 'master' }}
146+
if: ${{ github.event.inputs.release_type == 'release' && github.ref_name == 'main' }}
147147
needs: release
148148
runs-on: ubuntu-latest
149149
permissions:
@@ -183,7 +183,7 @@ jobs:
183183
git push -u origin ${{ env.PR_BRANCH }}
184184
185185
- name: Create pull request
186-
run: gh pr create -B master -H ${{ env.PR_BRANCH }} --title 'next development iteration ${{ env.NEXT_DEV_VERSION }}' --body 'Created by GitHub Action'
186+
run: gh pr create -B main -H ${{ env.PR_BRANCH }} --title 'next development iteration ${{ env.NEXT_DEV_VERSION }}' --body 'Created by GitHub Action'
187187
env:
188188
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
189189

.github/workflows/maven-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ jobs:
6161
git push -u origin ${{ env.PR_BRANCH }}
6262
6363
- name: Create pull request
64-
run: gh pr create -B master -H ${{ env.PR_BRANCH }} --title 'next development iteration ${{ github.event.inputs.next_version }}' --body 'Created by GitHub Action'
64+
run: gh pr create -B main -H ${{ env.PR_BRANCH }} --title 'next development iteration ${{ github.event.inputs.next_version }}' --body 'Created by GitHub Action'
6565
env:
6666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

RELEASING.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,31 @@ Release process uses GitHub actions and involves:
1717
- Remove the "-SNAPSHOT" suffix from the version and create scm tag
1818
- Create a GitHub release and upload artifacts
1919
- If patch release, delete the patch branch
20-
- For a formal release only, increment snapshot version on a branch and open a pull request
20+
- For a formal release only, increment snapshot version on a branch and open a pull request
2121
- Publish the artifacts to GitHub Maven Repo
2222

23-
The release process used for this repository creates a branch for every release that is prefixed with `release/`. Tags are not added nor are releases performed on the `master` branch.
24-
The `master` branch is the target for merging new commits and for development releases (-SNAPSHOT) only. All patches will originate using a `patch/` prefixed branch and once complete
25-
a new `release/` branch will be created.
23+
The release process used for this repository creates a branch for every release that is prefixed with `release/`. Tags are not added nor are releases performed on the `main` branch.
24+
The `main` branch is the target for merging new commits and for development releases (-SNAPSHOT) only. All patches will originate using a `patch/` prefixed branch and once complete
25+
a new `release/` branch will be created.
2626

2727
## Versioning
2828

29-
While not strictly enforced, versioning generally follows the [Semantic Versioning](https://semver.org/) Guide.
29+
While not strictly enforced, versioning generally follows the [Semantic Versioning](https://semver.org/) Guide.
3030

3131
## Release Types
3232

3333
### Formal Release
3434

35-
Formal release for the project and is intended to be stable.
35+
Formal release for the project and is intended to be stable.
3636

3737
```
3838
Action: `Maven: Release`
3939
Options:
40-
- From: `Branch: master`
40+
- From: `Branch: main`
4141
- Type: `Release`
4242
- Suffix: Leave blank
4343
```
44-
Creates a branch called `release/<version>` and performs release. One commit is added to a branch called `action/<version>` only to increment to the next snapshot version, and
44+
Creates a branch called `release/<version>` and performs release. One commit is added to a branch called `action/<version>` only to increment to the next snapshot version, and
4545
a pull request is created that needs to be approved and merged to finish the release process.
4646

4747

@@ -52,7 +52,7 @@ Releases may have bugs or vulnerabilities with a high enough severity that requi
5252
#### Create Patch Branch
5353

5454
Creating a patch branch can be done manually or using the GitHub action. The action was added as a convenience, and is not required as part
55-
of the workflow.
55+
of the workflow.
5656

5757
Note: When manually creating a patch branch, the name must start with `patch/` and must be based on a release branch, i.e. `release/<version>`.
5858
```
@@ -66,7 +66,7 @@ The user can specify one or more commit hashes, separated by spaces, to cherry-p
6666

6767
#### Release Patch
6868

69-
Patch release for the project that intended to fix one or more bugs/vulnerabilities for a release. Patches are not intended for new functionality
69+
Patch release for the project that intended to fix one or more bugs/vulnerabilities for a release. Patches are not intended for new functionality
7070
unless it is directly supporting a bugfix/hotfix.
7171

7272
```
@@ -93,7 +93,7 @@ Options:
9393
- Suffix: `-M1` <- this is just an example it can be anything, e.g. `M1` OR `-MILESTONE1`
9494
```
9595

96-
Creates a branch called `release/<version><suffix>`, i.e. `release/8.0.0-M1`, and performs release. No commits or pull request are created to increment
96+
Creates a branch called `release/<version><suffix>`, i.e. `release/8.0.0-M1`, and performs release. No commits or pull request are created to increment
9797
to the next version.
9898

9999
## Publishing a Release
@@ -109,11 +109,11 @@ Pushes release artifacts to a repo using `maven deploy`.
109109

110110
## Publishing a Release to Maven Central
111111

112-
Policy does not allow publishing to maven central via Action and is only authorized to be perforemd by specific individuals.
112+
Policy does not allow publishing to maven central via Action and is only authorized to be perforemd by specific individuals.
113113

114114
Using the `oss` profile will make the artifacts available here: [Sonatype/Maven Central](https://central.sonatype.com/artifact/gov.nsa/emissary)
115115

116116
In order for the following profile to work authorization is needed to publish to the gov.nsa maven group as well as having GPG signing configured in maven settings.
117117
```
118118
mvn clean deploy -Poss
119-
```
119+
```

0 commit comments

Comments
 (0)