Merge pull request #126 from sigprof/save-state-deprecated

Use `core.saveState` instead of raw `save-state` command
This commit is contained in:
Domen Kožar 2022-10-27 13:44:20 +02:00 committed by GitHub
commit 6a9a34cdd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

3
dist/main/index.js vendored
View file

@ -4287,7 +4287,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.IsPost = void 0; exports.IsPost = void 0;
const core = __importStar(__nccwpck_require__(186)); const core = __importStar(__nccwpck_require__(186));
const coreCommand = __importStar(__nccwpck_require__(351));
const exec = __importStar(__nccwpck_require__(514)); const exec = __importStar(__nccwpck_require__(514));
const which_1 = __importDefault(__nccwpck_require__(207)); const which_1 = __importDefault(__nccwpck_require__(207));
exports.IsPost = !!process.env['STATE_isPost']; exports.IsPost = !!process.env['STATE_isPost'];
@ -4364,7 +4363,7 @@ function upload() {
if (!exports.IsPost) { if (!exports.IsPost) {
// Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic. // Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic.
// This is necessary since we don't have a separate entry point. // This is necessary since we don't have a separate entry point.
coreCommand.issueCommand('save-state', { name: 'isPost' }, 'true'); core.saveState('isPost', 'true');
setup(); setup();
} }
else { else {

View file

@ -1,5 +1,4 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as coreCommand from '@actions/core/lib/command'
import * as exec from '@actions/exec'; import * as exec from '@actions/exec';
import which from 'which'; import which from 'which';
@ -79,7 +78,7 @@ async function upload() {
if (!IsPost) { if (!IsPost) {
// Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic. // Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic.
// This is necessary since we don't have a separate entry point. // This is necessary since we don't have a separate entry point.
coreCommand.issueCommand('save-state', {name: 'isPost'}, 'true') core.saveState('isPost', 'true');
setup() setup()
} else { } else {
// Post // Post