Skip to content

Commit

Permalink
feat: build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 5, 2024
1 parent c001ccf commit d5b2b6b
Show file tree
Hide file tree
Showing 199 changed files with 31,007 additions and 771 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

The MIT License (MIT)

Copyright (c) 2019-2020 Yuki Yamazaki
Copyright (c) 2019-2024 Yuki Yamazaki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
36 changes: 23 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `ts-graphviz/setup-graphviz` action
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

GitHub Action to set up Graphviz cross-platform(Linux, macOS, Windows).
Expand All @@ -21,7 +21,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
...
Expand All @@ -40,11 +40,11 @@ you can specify a specific version for each operating system (not macOS).
# libgraphviz-dev version on Ubuntu.
ubuntu-libgraphvizdev-version: '2.42.2-3build2'
# Skip to run apt update command on Ubuntu.
ubuntu-skip-apt-update: 'true' # defalt false
ubuntu-skip-apt-update: 'true' # default false
# graphviz version on Windows.
windows-graphviz-version: '2.49.3'
# Skip to run brew update command on macOS.
macos-skip-brew-update: 'true' # defalt false
macos-skip-brew-update: 'true' # default false
```
## See Also
Expand Down Expand Up @@ -72,17 +72,27 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<table>
<tbody>
<tr>
<td align="center"><a href="http://blog.kamiazya.tech/"><img src="https://avatars0.githubusercontent.com/u/35218186?v=4?s=100" width="100px;" alt="Yuki Yamazaki"/><br /><sub><b>Yuki Yamazaki</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=kamiazya" title="Code">💻</a> <a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=kamiazya" title="Tests">⚠️</a> <a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=kamiazya" title="Documentation">📖</a> <a href="#example-kamiazya" title="Examples">💡</a></td>
<td align="center"><a href="https://github.com/mhtb32"><img src="https://avatars3.githubusercontent.com/u/24754239?v=4?s=100" width="100px;" alt="Mohammad Hussein Tavakoli Bina "/><br /><sub><b>Mohammad Hussein Tavakoli Bina </b></sub></a><br /><a href="#ideas-mhtb32" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://smcleod.net"><img src="https://avatars.githubusercontent.com/u/862951?v=4?s=100" width="100px;" alt="Sam"/><br /><sub><b>Sam</b></sub></a><br /><a href="#maintenance-sammcj" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://github.com/mohawk2"><img src="https://avatars.githubusercontent.com/u/7308181?v=4?s=100" width="100px;" alt="mohawk2"/><br /><sub><b>mohawk2</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Amohawk2" title="Bug reports">🐛</a> <a href="#ideas-mohawk2" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/leadelngalame1611"><img src="https://avatars.githubusercontent.com/u/39901966?v=4?s=100" width="100px;" alt="leadelngalame1611"/><br /><sub><b>leadelngalame1611</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Aleadelngalame1611" title="Bug reports">🐛</a> <a href="#ideas-leadelngalame1611" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/stunney"><img src="https://avatars.githubusercontent.com/u/609012?v=4?s=100" width="100px;" alt="S. Tunney"/><br /><sub><b>S. Tunney</b></sub></a><br /><a href="#ideas-stunney" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://paul.kishimoto.name"><img src="https://avatars.githubusercontent.com/u/1634164?v=4?s=100" width="100px;" alt="Paul Natsuo Kishimoto"/><br /><sub><b>Paul Natsuo Kishimoto</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Akhaeru" title="Bug reports">🐛</a> <a href="#research-khaeru" title="Research">🔬</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://blog.kamiazya.tech/"><img src="https://avatars0.githubusercontent.com/u/35218186?v=4?s=100" width="100px;" alt="Yuki Yamazaki"/><br /><sub><b>Yuki Yamazaki</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=kamiazya" title="Code">💻</a> <a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=kamiazya" title="Tests">⚠️</a> <a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=kamiazya" title="Documentation">📖</a> <a href="#example-kamiazya" title="Examples">💡</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mhtb32"><img src="https://avatars3.githubusercontent.com/u/24754239?v=4?s=100" width="100px;" alt="Mohammad Hussein Tavakoli Bina "/><br /><sub><b>Mohammad Hussein Tavakoli Bina </b></sub></a><br /><a href="#ideas-mhtb32" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://smcleod.net"><img src="https://avatars.githubusercontent.com/u/862951?v=4?s=100" width="100px;" alt="Sam"/><br /><sub><b>Sam</b></sub></a><br /><a href="#maintenance-sammcj" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mohawk2"><img src="https://avatars.githubusercontent.com/u/7308181?v=4?s=100" width="100px;" alt="mohawk2"/><br /><sub><b>mohawk2</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Amohawk2" title="Bug reports">🐛</a> <a href="#ideas-mohawk2" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/leadelngalame1611"><img src="https://avatars.githubusercontent.com/u/39901966?v=4?s=100" width="100px;" alt="leadelngalame1611"/><br /><sub><b>leadelngalame1611</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Aleadelngalame1611" title="Bug reports">🐛</a> <a href="#ideas-leadelngalame1611" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/stunney"><img src="https://avatars.githubusercontent.com/u/609012?v=4?s=100" width="100px;" alt="S. Tunney"/><br /><sub><b>S. Tunney</b></sub></a><br /><a href="#ideas-stunney" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://paul.kishimoto.name"><img src="https://avatars.githubusercontent.com/u/1634164?v=4?s=100" width="100px;" alt="Paul Natsuo Kishimoto"/><br /><sub><b>Paul Natsuo Kishimoto</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Akhaeru" title="Bug reports">🐛</a> <a href="#research-khaeru" title="Research">🔬</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/jbms"><img src="https://avatars.githubusercontent.com/u/4211946?v=4?s=100" width="100px;" alt="Jeremy Maitin-Shepard"/><br /><sub><b>Jeremy Maitin-Shepard</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Ajbms" title="Bug reports">🐛</a> <a href="#ideas-jbms" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/mvrueden"><img src="https://avatars.githubusercontent.com/u/4202259?v=4?s=100" width="100px;" alt="mvrueden"/><br /><sub><b>mvrueden</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Amvrueden" title="Bug reports">🐛</a> <a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=mvrueden" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jbms"><img src="https://avatars.githubusercontent.com/u/4211946?v=4?s=100" width="100px;" alt="Jeremy Maitin-Shepard"/><br /><sub><b>Jeremy Maitin-Shepard</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Ajbms" title="Bug reports">🐛</a> <a href="#ideas-jbms" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mvrueden"><img src="https://avatars.githubusercontent.com/u/4202259?v=4?s=100" width="100px;" alt="mvrueden"/><br /><sub><b>mvrueden</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Amvrueden" title="Bug reports">🐛</a> <a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=mvrueden" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://dhimmel.com"><img src="https://avatars.githubusercontent.com/u/1117703?v=4?s=100" width="100px;" alt="Daniel Himmelstein"/><br /><sub><b>Daniel Himmelstein</b></sub></a><br /><a href="#question-dhimmel" title="Answering Questions">💬</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/deining"><img src="https://avatars.githubusercontent.com/u/18169566?v=4?s=100" width="100px;" alt="Andreas Deininger"/><br /><sub><b>Andreas Deininger</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=deining" title="Documentation">📖</a> <a href="#maintenance-deining" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://devmonstr.com"><img src="https://avatars.githubusercontent.com/u/17883887?v=4?s=100" width="100px;" alt="Joshua Strohminger"/><br /><sub><b>Joshua Strohminger</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=joshstrohminger" title="Code">💻</a> <a href="#maintenance-joshstrohminger" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/2bndy5"><img src="https://avatars.githubusercontent.com/u/14963867?v=4?s=100" width="100px;" alt="Brendan"/><br /><sub><b>Brendan</b></sub></a><br /><a href="#maintenance-2bndy5" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/glatterf42"><img src="https://avatars.githubusercontent.com/u/83776373?v=4?s=100" width="100px;" alt="Fridolin Glatter"/><br /><sub><b>Fridolin Glatter</b></sub></a><br /><a href="#maintenance-glatterf42" title="Maintenance">🚧</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Maetveis"><img src="https://avatars.githubusercontent.com/u/8176760?v=4?s=100" width="100px;" alt="Mészáros Gergely"/><br /><sub><b>Mészáros Gergely</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3AMaetveis" title="Bug reports">🐛</a> <a href="https://github.com/ts-graphviz/setup-graphviz/commits?author=Maetveis" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/XF-FW"><img src="https://avatars.githubusercontent.com/u/98830734?v=4?s=100" width="100px;" alt="Xavier Francisco"/><br /><sub><b>Xavier Francisco</b></sub></a><br /><a href="#ideas-XF-FW" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/stinodego"><img src="https://avatars.githubusercontent.com/u/3502351?v=4?s=100" width="100px;" alt="Stijn de Gooijer"/><br /><sub><b>Stijn de Gooijer</b></sub></a><br /><a href="https://github.com/ts-graphviz/setup-graphviz/issues?q=author%3Astinodego" title="Bug reports">🐛</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ inputs:
required: false

runs:
using: node16
using: node20
main: lib/main.js
49 changes: 24 additions & 25 deletions lib/GraphvizInstaller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,51 @@ class GraphvizInstaller {
}
async install() {
switch (process.platform) {
case 'darwin':
case "darwin":
await this.brewInstall();
break;
case 'linux':
case "linux":
await this.getAptInstall();
break;
case 'win32':
case "win32":
await this.chocoInstall();
break;
default:
throw new Error(`platform '${process.platform}' is not yet supported`);
}
}
async brewInstall() {
const skipBrewUpdate = (0, core_1.getBooleanInput)('macos-skip-brew-update');
const skipBrewUpdate = (0, core_1.getBooleanInput)("macos-skip-brew-update");
if (skipBrewUpdate === false) {
await (0, exec_1.exec)('brew', ['update']);
await (0, exec_1.exec)("brew", ["update"]);
}
await (0, exec_1.exec)('brew', [
'install',
'graphviz',
]);
await (0, exec_1.exec)("brew", ["install", "graphviz"]);
}
async getAptInstall() {
const skipAptUpdate = (0, core_1.getBooleanInput)('ubuntu-skip-apt-update');
const graphvizVersion = (0, core_1.getInput)('ubuntu-graphviz-version');
const libgraphvizdevVersion = (0, core_1.getInput)('ubuntu-libgraphvizdev-version');
const skipAptUpdate = (0, core_1.getBooleanInput)("ubuntu-skip-apt-update");
const graphvizVersion = (0, core_1.getInput)("ubuntu-graphviz-version");
const libgraphvizdevVersion = (0, core_1.getInput)("ubuntu-libgraphvizdev-version");
if (skipAptUpdate === false) {
await (0, exec_1.exec)('sudo', ['apt-get', 'update']);
await (0, exec_1.exec)("sudo", ["apt-get", "update"]);
}
await (0, exec_1.exec)('sudo', [
'apt-get',
'install',
'-y',
graphvizVersion ? `graphviz=${graphvizVersion}` : 'graphviz',
await (0, exec_1.exec)("sudo", [
"apt-get",
"install",
"-y",
graphvizVersion ? `graphviz=${graphvizVersion}` : "graphviz",
// https://github.com/pygraphviz/pygraphviz/issues/163#issuecomment-570770201
libgraphvizdevVersion ? `libgraphviz-dev=${libgraphvizdevVersion}` : 'libgraphviz-dev',
'pkg-config',
libgraphvizdevVersion
? `libgraphviz-dev=${libgraphvizdevVersion}`
: "libgraphviz-dev",
"pkg-config",
]);
}
async chocoInstall() {
const graphvizVersion = (0, core_1.getInput)('window-graphviz-version');
await (0, exec_1.exec)('choco', [
'install',
'graphviz',
...(graphvizVersion ? [`--version=${graphvizVersion}`] : [])
const graphvizVersion = (0, core_1.getInput)("windows-graphviz-version");
await (0, exec_1.exec)("choco", [
"install",
"graphviz",
...(graphvizVersion ? [`--version=${graphvizVersion}`] : []),
]);
}
}
Expand Down
Loading

0 comments on commit d5b2b6b

Please sign in to comment.