-
-
Notifications
You must be signed in to change notification settings - Fork 1
ci(workflows): use host-uk/build@dev for releases #264
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
10 commits
Select commit
Hold shift + click to select a range
e73e318
ci(workflows): use host-uk/build@dev for releases
Snider 4d83226
docs(mkdocs): update repo references to host-uk/core
Snider ca0f781
chore(coderabbit): disable auto-review, manual trigger only
Snider f791793
feat(ci): implement semver release channels
Snider 996fe05
fix(ci): use build@v3 and dot notation for versions
Snider 82eebcf
ci(workflows): update all actions to latest versions
Snider a78b54e
ci: temporarily use self-hosted runners
Snider 5ee8d3f
ci: fix webkit dep for Ubuntu 20.04 runners
Snider 69feabb
test: skip unwritable dir test when running as root
Snider 11c3d53
ci: revert to ubuntu-latest runners
Snider 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
Some comments aren't visible on the classic Files Changed page.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch | ||
| name: "Alpha Release: Manual" | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| attestations: write | ||
|
|
||
| env: | ||
| NEXT_VERSION: "0.0.4" | ||
|
|
||
| jobs: | ||
| build: | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-latest | ||
| platform: linux/amd64 | ||
| - os: ubuntu-latest | ||
| platform: linux/arm64 | ||
| - os: macos-latest | ||
| platform: darwin/universal | ||
| - os: windows-latest | ||
| platform: windows/amd64 | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Build | ||
| uses: host-uk/build@v3 | ||
| with: | ||
| build-name: core | ||
| build-platform: ${{ matrix.platform }} | ||
| build: true | ||
| package: true | ||
| sign: false | ||
|
|
||
| release: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Download artifacts | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| path: dist | ||
| merge-multiple: true | ||
|
|
||
| - name: Prepare release files | ||
| run: | | ||
| mkdir -p release | ||
| cp dist/* release/ 2>/dev/null || true | ||
| ls -la release/ | ||
|
|
||
| - name: Create alpha release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| VERSION="v${{ env.NEXT_VERSION }}-alpha.${{ github.run_number }}" | ||
|
|
||
| gh release create "$VERSION" \ | ||
| --title "Alpha: $VERSION" \ | ||
| --notes "Canary build from dev branch. | ||
|
|
||
| **Version:** $VERSION | ||
| **Commit:** ${{ github.sha }} | ||
| **Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC') | ||
| **Run:** ${{ github.run_id }} | ||
|
|
||
| ## Channel: Alpha (Canary) | ||
|
|
||
| This is an automated pre-release for early testing. | ||
|
|
||
| - Systems and early adopters can test breaking changes | ||
| - Quality scoring determines promotion to beta | ||
| - Use stable releases for production | ||
|
|
||
| ## Installation | ||
|
|
||
| \`\`\`bash | ||
| # macOS/Linux | ||
| curl -fsSL https://github.com/host-uk/core/releases/download/$VERSION/core-linux-amd64 -o core | ||
| chmod +x core && sudo mv core /usr/local/bin/ | ||
| \`\`\` | ||
| " \ | ||
| --prerelease \ | ||
| --target dev \ | ||
| release/* |
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,93 @@ | ||
| # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push | ||
| name: "Alpha Release: Push" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [dev] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| attestations: write | ||
|
|
||
| env: | ||
| NEXT_VERSION: "0.0.4" | ||
|
|
||
| jobs: | ||
| build: | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-latest | ||
| platform: linux/amd64 | ||
| - os: ubuntu-latest | ||
| platform: linux/arm64 | ||
| - os: macos-latest | ||
| platform: darwin/universal | ||
| - os: windows-latest | ||
| platform: windows/amd64 | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Build | ||
| uses: host-uk/build@v3 | ||
| with: | ||
| build-name: core | ||
| build-platform: ${{ matrix.platform }} | ||
| build: true | ||
| package: true | ||
| sign: false | ||
|
|
||
| release: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Download artifacts | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| path: dist | ||
| merge-multiple: true | ||
|
|
||
| - name: Prepare release files | ||
| run: | | ||
| mkdir -p release | ||
| cp dist/* release/ 2>/dev/null || true | ||
| ls -la release/ | ||
|
|
||
| - name: Create alpha release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| VERSION="v${{ env.NEXT_VERSION }}-alpha.${{ github.run_number }}" | ||
|
|
||
| gh release create "$VERSION" \ | ||
| --title "Alpha: $VERSION" \ | ||
| --notes "Canary build from dev branch. | ||
|
|
||
| **Version:** $VERSION | ||
| **Commit:** ${{ github.sha }} | ||
| **Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC') | ||
| **Run:** ${{ github.run_id }} | ||
|
|
||
| ## Channel: Alpha (Canary) | ||
|
|
||
| This is an automated pre-release for early testing. | ||
|
|
||
| - Systems and early adopters can test breaking changes | ||
| - Quality scoring determines promotion to beta | ||
| - Use stable releases for production | ||
|
|
||
| ## Installation | ||
|
|
||
| \`\`\`bash | ||
| # macOS/Linux | ||
| curl -fsSL https://github.com/host-uk/core/releases/download/$VERSION/core-linux-amd64 -o core | ||
| chmod +x core && sudo mv core /usr/local/bin/ | ||
| \`\`\` | ||
| " \ | ||
| --prerelease \ | ||
| --target dev \ | ||
| release/* |
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
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,41 @@ | ||
| # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch | ||
| name: "CI: Manual" | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| CORE_VERSION: dev | ||
|
|
||
| jobs: | ||
| qa: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: 'go.mod' | ||
|
|
||
| - name: Install system dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev | ||
|
|
||
| - name: Build core CLI | ||
| run: | | ||
| go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core . | ||
| core --version | ||
|
|
||
| - name: Generate code | ||
| run: go generate ./internal/cmd/updater/... | ||
|
|
||
| - name: Run QA | ||
| # Skip lint until golangci-lint supports Go 1.25 | ||
| run: core go qa --skip=lint | ||
|
|
||
| - name: Verify build | ||
| run: | | ||
| core build --targets=linux/amd64 --ci | ||
| dist/linux_amd64/core --version | ||
|
Comment on lines
+12
to
+41
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
||
Oops, something went wrong.
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.