-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change registry from General to Green (#1)
- Loading branch information
1 parent
d512f03
commit 58688ea
Showing
9 changed files
with
209 additions
and
88 deletions.
There are no files selected for viewing
This file contains 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 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,51 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
|
||
jobs: | ||
test: | ||
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 60 | ||
permissions: | ||
actions: write | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- '1' | ||
- '1.8' | ||
- '1.9' | ||
os: | ||
- ubuntu-latest | ||
arch: | ||
- x64 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/add-julia-registry@v2 | ||
with: | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
registry: bhftbootcamp/Green | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: ${{ matrix.version }} | ||
arch: ${{ matrix.arch }} | ||
- uses: julia-actions/cache@v2 | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-runtest@v1 | ||
- uses: julia-actions/julia-processcoverage@v1 | ||
- uses: codecov/codecov-action@v4 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
files: lcov.info |
This file contains 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,34 @@ | ||
name: Doc Preview Cleanup | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time | ||
concurrency: | ||
group: doc-preview-cleanup | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
doc-preview-cleanup: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
- name: Delete preview and history + push changes | ||
run: | | ||
if [ -d "${preview_dir}" ]; then | ||
git config user.name "Documenter.jl" | ||
git config user.email "documenter@juliadocs.github.io" | ||
git rm -rf "${preview_dir}" | ||
git commit -m "delete preview" | ||
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) | ||
git push --force origin gh-pages-new:gh-pages | ||
fi | ||
env: | ||
preview_dir: previews/PR${{ github.event.number }} | ||
|
This file contains 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 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,60 @@ | ||
name: Update registry | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
registry: | ||
name: Update registry | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/add-julia-registry@v2 | ||
with: | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
registry: bhftbootcamp/Green | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: 1.9 | ||
- uses: julia-actions/cache@v2 | ||
- name: Configure Git | ||
run: | | ||
sudo apt-get update -qq && sudo apt-get install -y -qq git | ||
git config --global user.name github-actions[bot] | ||
git config --global user.email github-actions[bot]@users.noreply.github.com | ||
- name: Updating package version in registers | ||
run: | | ||
julia -e ' | ||
using Pkg | ||
Pkg.add("LocalRegistry") | ||
Pkg.develop(url = "git@github.com:${{ github.repository }}.git") | ||
using LocalRegistry | ||
using TOML | ||
package_name = match(r"^.*/(.*?)(\.jl)?(\.git)?$", "${{ github.repository }}") | ||
package_name == nothing && error("Invalid package name: ${{ github.repository }}") | ||
package_name = package_name[1] | ||
|
||
package_dir = joinpath(DEPOT_PATH[1], "dev", package_name) | ||
project_toml = TOML.parsefile(joinpath(package_dir, "Project.toml")) | ||
version = VersionNumber(project_toml["version"]) | ||
|
||
LocalRegistry.register( | ||
package_name, | ||
repo = "https://github.com/${{ github.repository }}.git", | ||
registry = "git@github.com:bhftbootcamp/Green.git", | ||
ignore_reregistration = true, | ||
) | ||
|
||
run(Cmd(`git tag -f "v$version"`, dir = package_dir)) | ||
run(Cmd(`git push --force origin "v$version"`, dir = package_dir)) | ||
' | ||
This file contains 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,26 @@ | ||
name: Create release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Release pushed tag | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref_name }} | ||
run: | | ||
gh release create "$tag" \ | ||
--repo="$GITHUB_REPOSITORY" \ | ||
--title="v${tag#v}" \ | ||
--generate-notes | ||
This file was deleted.
Oops, something went wrong.
This file contains 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 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