Fix action for package registration. #12
Workflow file for this run
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
name: Register Julia Package to Custom Registry | |
on: | |
push: | |
branches: | |
- 85-add-package-release-in-julia | |
jobs: | |
register-package: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# Set up Julia environment | |
- name: Set Up Julia | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1.6' | |
# Install LocalRegistry.jl | |
- name: Install LocalRegistry.jl | |
run: julia -e 'using Pkg; Pkg.add("LocalRegistry")' | |
# Clone the registry | |
- name: Clone Registry | |
run: | | |
git clone https://github.com/open-and-sustainable/julia.git /tmp/local-registry | |
# Ensure the correct branch is checked out | |
- name: Checkout Main Branch | |
run: | | |
cd /tmp/local-registry | |
git checkout main | |
# Register the package | |
- name: Register Package | |
env: | |
GITHUB_TOKEN: ${{ secrets.REGISTRY_PAT }} | |
run: | | |
julia -e ' | |
using LocalRegistry; | |
LocalRegistry.register( | |
"julia/PRISMAID", # Path to the package | |
registry = "/tmp/local-registry", # Path to the cloned registry | |
commit = true, | |
push = true, | |
branch = "main" # Ensure main branch is used | |
)' | |