Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Added debug info
  • Loading branch information
StephenHodgson committed Aug 12, 2024
1 parent 1e592ce commit e9d65a5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
1 change: 0 additions & 1 deletion action.yaml → action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: 'upm-config'
description: 'A GitHub Action for setting Unity UPM private scoped registry configurations in CI/CD workflows.'

inputs:
registry-url:
description: 'The URL of the private scoped registry.'
Expand Down
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26175,6 +26175,7 @@ async function Run() {
module.exports = { Run };

async function authenticate(registry_url, username, password) {
core.debug('Authenticating...');
const ascii_auth = `${username}:${password}`.toString('ascii');
const base64_auth = Buffer.from(ascii_auth).toString('base64');
core.setSecret(base64_auth);
Expand Down Expand Up @@ -26210,7 +26211,7 @@ async function authenticate(registry_url, username, password) {
}

async function validate_auth_token(registry_url, auth_token) {
// validate that the auth token is valid by fetching the list of packages
core.debug('Validating the auth token...');
let output = '';
await exec.exec('curl', [
'-X', 'GET',
Expand All @@ -26234,6 +26235,7 @@ async function validate_auth_token(registry_url, auth_token) {
}

async function save_upm_config(registry_url, auth_token) {
core.debug('Saving .upmconfig.toml...');
const upm_config_toml_path = get_upm_config_toml_path();
try {
await fs.access(upm_config_toml_path);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "upm-config",
"version": "2.0.0",
"description": "A GitHub action for setting Unity UPM private scoped registry credentials in CI/CD workflows.",
"version": "2.0.1",
"description": "A GitHub Action for setting Unity Engine UPM private scoped registry credentials in CI/CD workflows.",
"author": "RageAgainstThePixel",
"license": "MIT",
"repository": {
Expand Down
4 changes: 3 additions & 1 deletion src/upm_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ async function Run() {
module.exports = { Run };

async function authenticate(registry_url, username, password) {
core.debug('Authenticating...');
const ascii_auth = `${username}:${password}`.toString('ascii');
const base64_auth = Buffer.from(ascii_auth).toString('base64');
core.setSecret(base64_auth);
Expand Down Expand Up @@ -58,7 +59,7 @@ async function authenticate(registry_url, username, password) {
}

async function validate_auth_token(registry_url, auth_token) {
// validate that the auth token is valid by fetching the list of packages
core.debug('Validating the auth token...');
let output = '';
await exec.exec('curl', [
'-X', 'GET',
Expand All @@ -82,6 +83,7 @@ async function validate_auth_token(registry_url, auth_token) {
}

async function save_upm_config(registry_url, auth_token) {
core.debug('Saving .upmconfig.toml...');
const upm_config_toml_path = get_upm_config_toml_path();
try {
await fs.access(upm_config_toml_path);
Expand Down

0 comments on commit e9d65a5

Please sign in to comment.