-
Notifications
You must be signed in to change notification settings - Fork 58
ci: switch to release please and deprecate github pat #649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b7b9e0d
ci: switch to release please and deprecate github pat
subzero10 2d0905a
chore: update publish.yml to include repository-projects permission
subzero10 2074903
try adding sampler call to deal with race issues
rabidpraxis 544630d
bump otp for 1.18 tests
rabidpraxis 57d32f9
try bumping x509
rabidpraxis 8a8ffa6
chore: remove expublish from deps
subzero10 40506b7
chore: move to a single job
subzero10 2a02ee6
chore: wrap with quotes
subzero10 612ffd7
chore: target master branch
subzero10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Check PR Title | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ master ] | ||
| types: [opened, edited, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| commitlint: | ||
| name: Check PR title | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '20.x' | ||
|
|
||
| - name: Setup | ||
| run: | | ||
| npm install -g @commitlint/cli @commitlint/config-conventional | ||
| echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js | ||
|
|
||
| - name: Verify PR title is in the correct format | ||
| env: | ||
| TITLE: ${{ github.event.pull_request.title }} | ||
| run: | | ||
| echo "$TITLE" | npx commitlint -V | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ jobs: | |
| otp: '27.0' | ||
| - pair: | ||
| elixir: '1.18' | ||
| otp: '28.0' | ||
| otp: '28.1' | ||
| lint: lint | ||
|
|
||
| runs-on: ubuntu-22.04 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,62 +1,59 @@ | ||
| name: Publish New Release | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| type: choice | ||
| description: What version to publish? | ||
| options: | ||
| - patch | ||
| - minor | ||
| - major | ||
| changes: | ||
| description: Specify an entry for the changelog | ||
| required: true | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| permissions: | ||
| contents: write | ||
| issues: write | ||
| pull-requests: write | ||
| repository-projects: read # this is required by release-please-action to set the auto-release tags | ||
|
|
||
| # Note for release-please-action: | ||
| # The action will set the auto-release tags for the release PR. If these tags do not already exist, the action will fail to create them. | ||
| # Therefore, make sure that the tags are created in the repository before running the release workflow: `autorelease: pending`, `autorelease: tagged` | ||
|
|
||
| jobs: | ||
| ci: | ||
| uses: ./.github/workflows/elixir.yml | ||
| secrets: inherit | ||
|
|
||
| publish: | ||
| release-please: | ||
| runs-on: ubuntu-latest | ||
| needs: [ci] | ||
| name: Build and publish to hex.pm | ||
| runs-on: ubuntu-22.04 | ||
| env: | ||
| HEX_API_KEY: ${{ secrets.HEX_API_KEY }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| - uses: googleapis/release-please-action@v4 | ||
| id: release | ||
| with: | ||
| token: ${{ secrets.GH_PUBLISH_PAT }} | ||
| fetch-depth: 0 | ||
| ref: master | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| release-type: elixir | ||
|
|
||
| - name: Git Config | ||
| run: | | ||
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
| git config --global user.name "github-actions[bot]" | ||
| # The logic below handles Hex.pm publishing. | ||
| - uses: actions/checkout@v5 | ||
| if: ${{ steps.release.outputs.release_created }} | ||
|
|
||
| - name: Setup Elixir | ||
| uses: erlef/setup-elixir@v1 | ||
| - name: Set up Elixir | ||
| if: ${{ steps.release.outputs.release_created }} | ||
| uses: erlef/setup-beam@v1 | ||
| with: | ||
| otp-version: '24.3' | ||
| elixir-version: '1.15' | ||
| otp-version: '26' | ||
|
|
||
| - name: Restore dependencies cache | ||
| if: ${{ steps.release.outputs.release_created }} | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: deps | ||
| key: ${{ runner.os }}-publish-mix-${{ hashFiles('**/mix.lock') }} | ||
| restore-keys: ${{ runner.os }}-publish-mix- | ||
|
|
||
| - name: Install deps | ||
| - name: Install dependencies | ||
| if: ${{ steps.release.outputs.release_created }} | ||
| run: mix deps.get | ||
|
|
||
| - name: Add changelog entry | ||
| run: echo "${{ inputs.changes }}" > RELEASE.md | ||
|
|
||
| - name: Bump version, generate changelog, push to git, publish on hex.pm | ||
| run: mix expublish.${{ inputs.version }} --disable-test | ||
|
|
||
|
|
||
| - name: Publish to Hex.pm | ||
| if: ${{ steps.release.outputs.release_created }} | ||
| run: mix hex.publish --yes | ||
| env: | ||
| HEX_API_KEY: ${{ secrets.HEX_API_KEY }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.