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

Publish New Versions #5

Merged
merged 1 commit into from
Jul 12, 2020
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
5 changes: 0 additions & 5 deletions .changes/build-action-on-preversion.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changes/custom-script.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changes/debug-build.md

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [0.0.3]

- Build action on preversion so we can't forget to build when a version is updated.
- [af79aee](https://github.com/tauri-apps/tauri-action/commit/af79aee2e0022f4402f619d1177e63596f8c950c) chore: build action on version ([#7](https://github.com/tauri-apps/tauri-action/pull/7)) on 2020-07-12
- Adds an option to run a custom package.json script with the npmScript input.
- [f91ad8d](https://github.com/tauri-apps/tauri-action/commit/f91ad8dc315e9d911f3351bead517b35b89a1e6f) feat(action) add option to run custom package.json script ([#8](https://github.com/tauri-apps/tauri-action/pull/8)) on 2020-07-12
- Adds an option to include a debug build with the includeDebug (bool) input.
- [a6b824c](https://github.com/tauri-apps/tauri-action/commit/a6b824c578593003332957fa899c354c40e20df5) feat(action) add option to include a debug build ([#6](https://github.com/tauri-apps/tauri-action/pull/6)) on 2020-07-12

## [0.0.2]

- Implement covector for change management and git tag creation.
Expand Down
13 changes: 9 additions & 4 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,16 @@ function execCommand(command, { cwd }) {
env: { FORCE_COLOR: '0' },
}).then();
}
function buildProject(root, debug, { configPath, distPath, iconPath }) {
function buildProject(root, debug, { configPath, distPath, iconPath, npmScript }) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve) => {
if (hasTauriDependency(root)) {
const runner = usesYarn(root) ? 'yarn tauri' : 'npx tauri';
resolve(runner);
if (npmScript) {
resolve(usesYarn(root) ? `yarn ${npmScript}` : `npm run ${npmScript}`);
}
else {
resolve(usesYarn(root) ? 'yarn tauri' : 'npx tauri');
}
}
else {
execCommand('npm install -g tauri', { cwd: undefined }).then(() => resolve('tauri'));
Expand Down Expand Up @@ -156,6 +160,7 @@ function run() {
const distPath = core.getInput('distPath');
const iconPath = core.getInput('iconPath');
const includeDebug = core.getInput('includeDebug') === 'true';
const npmScript = core.getInput('npmScript');
let tagName = core.getInput('tagName').replace('refs/tags/', '');
let releaseName = core.getInput('releaseName').replace('refs/tags/', '');
let body = core.getInput('releaseBody');
Expand All @@ -165,7 +170,7 @@ function run() {
if (Boolean(tagName) !== Boolean(releaseName)) {
throw new Error('`tag` is required along with `releaseName` when creating a release.');
}
const options = { configPath: fs_1.existsSync(configPath) ? configPath : null, distPath, iconPath };
const options = { configPath: fs_1.existsSync(configPath) ? configPath : null, distPath, iconPath, npmScript };
const artifacts = yield buildProject(projectPath, false, options);
if (includeDebug) {
const debugArtifacts = yield buildProject(projectPath, true, options);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tauri-action",
"version": "0.0.2",
"version": "0.0.3",
"description": "Tauri GitHub Action",
"main": "dist/index.js",
"scripts": {
Expand Down