Compare commits

...

9 Commits

Author SHA1 Message Date
Platane
909a9c7fce 📦 1.0.2-rc.6 2022-03-24 11:03:14 +00:00
platane
e1dcae75b9 👷 2022-03-24 11:58:31 +01:00
Platane
5df41911e6 📦 1.0.2-rc.5 2022-03-24 10:53:45 +00:00
platane
c9b130d9da 🔨 try async import 2022-03-24 11:51:16 +01:00
Platane
05df7cb642 📦 1.0.2-rc.4 2022-03-24 10:35:37 +00:00
Platane
309795a2a5 📦 v1.0.2-rc.4 2022-03-24 10:28:00 +00:00
platane
e79b3bb634 👷 2022-03-24 11:25:50 +01:00
Platane
7c0522bfa8 📦 1.0.2-rc.3 2022-03-24 10:19:14 +00:00
platane
be91c43c71 👷 2022-03-24 11:13:40 +01:00
8 changed files with 48735 additions and 11 deletions

View File

@@ -42,7 +42,7 @@ jobs:
- name: update action.yml
run: |
sed -i "s/image: .*/image: docker:\/\/platane\/snk:${{ steps.docker-build.outputs.digest }}/" action.yml
sed -i "s/image: .*/image: docker:\/\/platane\/snk@${{ steps.docker-build.outputs.digest }}/" action.yml
- uses: actions/setup-node@v2
with:
@@ -55,8 +55,8 @@ jobs:
- name: build svg-only action
run: |
yarn install --frozen-lockfile
yarn build:demo
mv packages/demo/dist/* svg-only/
yarn build:action
mv packages/action/dist svg-only/dist
- name: push new commit
uses: EndBug/add-and-commit@v7
@@ -70,6 +70,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
# release_name: Release ${{ github.event.inputs.version }}
body: ${{ github.event.inputs.description }}
prerelease: ${{ github.event.inputs.prerelease }}

1
.gitignore vendored
View File

@@ -2,4 +2,5 @@ node_modules
npm-debug.log*
yarn-error.log*
dist
!svg-only/dist
build

View File

@@ -4,7 +4,7 @@ author: "platane"
runs:
using: docker
image: Dockerfile
image: docker://platane/snk@sha256:767615f6d5cc39228b8adb364346ab585821020eb604ab353a5f55edb90bf2d0
inputs:
github_user_name:

View File

@@ -1,7 +1,7 @@
{
"name": "snk",
"description": "Generates a snake game from a github user contributions grid",
"version": "1.0.1",
"version": "1.0.2-rc.6",
"private": true,
"repository": "github:platane/snk",
"devDependencies": {
@@ -17,7 +17,7 @@
],
"scripts": {
"type": "tsc --noEmit",
"lint": "yarn prettier -c '**/*.{ts,js,json,md,yml,yaml}' '!packages/*/dist/**'",
"lint": "yarn prettier -c '**/*.{ts,js,json,md,yml,yaml}' '!packages/*/dist/**' '!svg-only/dist/**'",
"test": "jest --verbose --passWithNoTests --no-cache",
"dev:demo": "( cd packages/demo ; yarn dev )",
"build:demo": "( cd packages/demo ; yarn build )",

View File

@@ -1,8 +1,6 @@
import { getGithubUserContribution } from "@snk/github-user-contribution";
import { userContributionToGrid } from "./userContributionToGrid";
import { getBestRoute } from "@snk/solver/getBestRoute";
import { createGif } from "@snk/gif-creator";
import { createSvg } from "../svg-creator";
import { snake4 } from "@snk/types/__fixtures__/snake";
import { getPathToPose } from "@snk/solver/getPathToPose";
@@ -41,11 +39,13 @@ export const generateContributionSnake = async (
if (format.gif) {
console.log("📹 creating gif");
const { createGif } = await import("@snk/gif-creator");
output.gif = await createGif(grid, chain, drawOptions, gifOptions);
}
if (format.svg) {
console.log("🖌 creating svg");
const { createSvg } = await import("@snk/svg-creator");
output.svg = createSvg(grid, chain, drawOptions, gifOptions);
}

View File

@@ -4,7 +4,8 @@
"dependencies": {
"@actions/core": "1.6.0",
"@snk/gif-creator": "1.0.0",
"@snk/github-user-contribution": "1.0.0"
"@snk/github-user-contribution": "1.0.0",
"@snk/svg-creator": "1.0.0"
},
"devDependencies": {
"@zeit/ncc": "0.22.3",

View File

@@ -4,7 +4,7 @@ author: "platane"
runs:
using: node16
main: index.js
main: dist/index.js
inputs:
github_user_name:

48723
svg-only/dist/index.js vendored Normal file

File diff suppressed because one or more lines are too long