Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/nmdev-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Confirm this token cannot read private NMDEV source
env:
GH_TOKEN: ${{ github.token }}
run: |
status=$(curl --silent --output /dev/null --write-out '%{http_code}' -H "Authorization: Bearer $GH_TOKEN" https://api.github.com/repos/nmltd/nmdev/contents/pom.xml)
test "$status" = 404
echo 'PASS: customer CI token cannot access private NMDEV source'
- uses: actions/checkout@v4
with:
persist-credentials: false
Expand All @@ -27,11 +34,11 @@ jobs:
with:
distribution: temurin
java-version: '8'
server-id: github-nmdev
server-id: github-nm-packages
- name: Download stable NM Dev, build and run from a fresh cache
working-directory: samples/new-nmdev-project
env:
GITHUB_TOKEN: ${{ secrets.NM_REPOSITORIES_TOKEN || github.token }}
GITHUB_TOKEN: ${{ github.token }}
run: mvn -B -ntp -U -Dmaven.repo.local="$RUNNER_TEMP/m2" clean verify exec:java
- name: Run the packaged sample and graph example
working-directory: samples/new-nmdev-project
Expand Down
6 changes: 3 additions & 3 deletions samples/new-nmdev-project/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# New NMDEV project

This sample uses the published obfuscated combined `dev.nm:nmdev:1.2.6` JAR from GitHub Packages. Java 8 or later and Maven are required.
This sample uses the published obfuscated combined `dev.nm:nmdev-dist:1.2.6` JAR from GitHub Packages. Java 8 or later and Maven are required.

## Authentication

The binary package is hosted at https://maven.pkg.github.com/nmltd/nmdev. Your GitHub account and token must have access to the package; contact NM Dev for access. Create a personal access token (classic) with `read:packages` using [GitHub's instructions](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).
The binary package is hosted at https://maven.pkg.github.com/nmltd/maven-packages. The binary package is public; no access to the private source repository is required. GitHub still requires authentication for Maven downloads. Create a personal access token (classic) with `read:packages` using [GitHub's instructions](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).

Add the following server to `~/.m2/settings.xml` (merge it into existing settings):
```xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0">
<servers>
<server>
<id>github-nmdev</id>
<id>github-nm-packages</id>
<username>${env.GITHUB_USERNAME}</username>
<password>${env.GITHUB_PACKAGES_TOKEN}</password>
</server>
Expand Down
6 changes: 3 additions & 3 deletions samples/new-nmdev-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
</properties>
<repositories>
<repository>
<id>github-nmdev</id>
<id>github-nm-packages</id>
<name>NMDEV GitHub Packages</name>
<url>https://maven.pkg.github.com/nmltd/nmdev</url>
<url>https://maven.pkg.github.com/nmltd/maven-packages</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>dev.nm</groupId>
<artifactId>nmdev</artifactId>
<artifactId>nmdev-dist</artifactId>
<version>${nmdev.version}</version>
</dependency>
<dependency>
Expand Down
Loading