Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email protected] #5

Merged
merged 2 commits into from
Aug 12, 2024
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
4 changes: 3 additions & 1 deletion action.yaml → action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: 'upm-config'
description: 'A GitHub Action for setting Unity UPM private scoped registry configurations in CI/CD workflows.'

branding:
color: 'blue'
icon: 'archive'
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