-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.92 KB
/
Registry.yml
File metadata and controls
59 lines (51 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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))
'