Compare commits
4 Commits
v1.0.2-rc.
...
v1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0374e20a50 | ||
|
|
7ba88d1fbd | ||
|
|
909a9c7fce | ||
|
|
e1dcae75b9 |
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@@ -32,7 +32,8 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- uses: docker/build-push-action@v2
|
||||
- name: build and publish the docker image
|
||||
uses: docker/build-push-action@v2
|
||||
id: docker-build
|
||||
with:
|
||||
push: true
|
||||
@@ -40,7 +41,7 @@ jobs:
|
||||
platane/snk:${{ github.sha }}
|
||||
platane/snk:${{ github.event.inputs.version }}
|
||||
|
||||
- name: update action.yml
|
||||
- name: update action.yml to point to the newly created docker image
|
||||
run: |
|
||||
sed -i "s/image: .*/image: docker:\/\/platane\/snk@${{ steps.docker-build.outputs.digest }}/" action.yml
|
||||
|
||||
@@ -49,19 +50,19 @@ jobs:
|
||||
cache: yarn
|
||||
node-version: 16
|
||||
|
||||
- name: bump version
|
||||
run: yarn version --no-git-tag-version --new-version ${{ github.event.inputs.version }}
|
||||
|
||||
- name: build svg-only action
|
||||
run: |
|
||||
yarn install --frozen-lockfile
|
||||
yarn build:action
|
||||
mv packages/action/dist/* svg-only/
|
||||
mv packages/action/dist svg-only/dist
|
||||
|
||||
- name: bump package version
|
||||
run: yarn version --no-git-tag-version --new-version ${{ github.event.inputs.version }}
|
||||
|
||||
- name: push new commit
|
||||
uses: EndBug/add-and-commit@v7
|
||||
with:
|
||||
add: package.json svg-only action.yml
|
||||
add: package.json svg-only/dist action.yml
|
||||
message: 📦 ${{ github.event.inputs.version }}
|
||||
tag: v${{ github.event.inputs.version }}
|
||||
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,4 +2,5 @@ node_modules
|
||||
npm-debug.log*
|
||||
yarn-error.log*
|
||||
dist
|
||||
!svg-only/dist
|
||||
build
|
||||
@@ -20,7 +20,7 @@ Available as github action. Automatically generate a new image at the end of the
|
||||
**github action**
|
||||
|
||||
```yaml
|
||||
- uses: Platane/snk@master
|
||||
- uses: Platane/snk@v1
|
||||
with:
|
||||
# github user name to read the contribution graph from (**required**)
|
||||
# using action context var `github.repository_owner` or specified user
|
||||
@@ -35,7 +35,9 @@ Available as github action. Automatically generate a new image at the end of the
|
||||
svg_out_path: dist/github-snake.svg
|
||||
```
|
||||
|
||||
> [example with cron job](https://github.com/Platane/Platane/blob/master/.github/workflows/main.yml#L24-L29)
|
||||
[example with cron job](https://github.com/Platane/Platane/blob/master/.github/workflows/main.yml#L24-L29)
|
||||
|
||||
If you are only interested in generating a svg, you can use this other faster action: `uses: Platane/snk/svg-only@v1`
|
||||
|
||||
**interactive demo**
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ author: "platane"
|
||||
|
||||
runs:
|
||||
using: docker
|
||||
image: docker://platane/snk@sha256:d0501eedf6cf11223e720dd0b0071165e5a4f87aa67961a71a723ad273adbc77
|
||||
image: docker://platane/snk@sha256:a96bf2d906152d53b795023087d4bac04f8665f7ab06a7ec1ca0a552bfabe7d2
|
||||
|
||||
inputs:
|
||||
github_user_name:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "snk",
|
||||
"description": "Generates a snake game from a github user contributions grid",
|
||||
"version": "1.0.2-rc.5",
|
||||
"version": "1.1.0",
|
||||
"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 )",
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
"@actions/core": "1.6.0",
|
||||
"@snk/gif-creator": "1.0.0",
|
||||
"@snk/github-user-contribution": "1.0.0",
|
||||
"@snk/svg-creator": "1.0.0"
|
||||
"@snk/solver": "1.0.0",
|
||||
"@snk/svg-creator": "1.0.0",
|
||||
"@snk/types": "1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@zeit/ncc": "0.22.3",
|
||||
|
||||
@@ -4,7 +4,7 @@ author: "platane"
|
||||
|
||||
runs:
|
||||
using: node16
|
||||
main: index.js
|
||||
main: dist/index.js
|
||||
|
||||
inputs:
|
||||
github_user_name:
|
||||
|
||||
Reference in New Issue
Block a user