Skip to content

Commit 7ba88d1

Browse files
committed
πŸ““
1 parent 909a9c7 commit 7ba88d1

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

β€Ž.github/workflows/release.ymlβ€Ž

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ jobs:
3232
username: ${{ secrets.DOCKERHUB_USERNAME }}
3333
password: ${{ secrets.DOCKERHUB_TOKEN }}
3434

35-
- uses: docker/build-push-action@v2
35+
- name: build and publish the docker image
36+
uses: docker/build-push-action@v2
3637
id: docker-build
3738
with:
3839
push: true
3940
tags: |
4041
platane/snk:${{ github.sha }}
4142
platane/snk:${{ github.event.inputs.version }}
4243
43-
- name: update action.yml
44+
- name: update action.yml to point to the newly created docker image
4445
run: |
4546
sed -i "s/image: .*/image: docker:\/\/platane\/snk@${{ steps.docker-build.outputs.digest }}/" action.yml
4647
@@ -49,19 +50,19 @@ jobs:
4950
cache: yarn
5051
node-version: 16
5152

52-
- name: bump version
53-
run: yarn version --no-git-tag-version --new-version ${{ github.event.inputs.version }}
54-
5553
- name: build svg-only action
5654
run: |
5755
yarn install --frozen-lockfile
5856
yarn build:action
5957
mv packages/action/dist svg-only/dist
6058
59+
- name: bump package version
60+
run: yarn version --no-git-tag-version --new-version ${{ github.event.inputs.version }}
61+
6162
- name: push new commit
6263
uses: EndBug/add-and-commit@v7
6364
with:
64-
add: package.json svg-only action.yml
65+
add: package.json svg-only/dist action.yml
6566
message: πŸ“¦ ${{ github.event.inputs.version }}
6667
tag: v${{ github.event.inputs.version }}
6768

β€ŽREADME.mdβ€Ž

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Available as github action. Automatically generate a new image at the end of the
2020
**github action**
2121

2222
```yaml
23-
- uses: Platane/snk@master
23+
- uses: Platane/snk@v1
2424
with:
2525
# github user name to read the contribution graph from (**required**)
2626
# 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
3535
svg_out_path: dist/github-snake.svg
3636
```
3737
38-
> [example with cron job](https://github.com/Platane/Platane/blob/master/.github/workflows/main.yml#L24-L29)
38+
[example with cron job](https://github.com/Platane/Platane/blob/master/.github/workflows/main.yml#L24-L29)
39+
40+
If you are only interested in generating a svg, you can use this other faster action: `uses: Platane/snk/svg-only@v1`
3941

4042
**interactive demo**
4143

β€Žpackages/action/package.jsonβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"@actions/core": "1.6.0",
66
"@snk/gif-creator": "1.0.0",
77
"@snk/github-user-contribution": "1.0.0",
8-
"@snk/svg-creator": "1.0.0"
8+
"@snk/solver": "1.0.0",
9+
"@snk/svg-creator": "1.0.0",
10+
"@snk/types": "1.0.0"
911
},
1012
"devDependencies": {
1113
"@zeit/ncc": "0.22.3",

0 commit comments

Comments
Β (0)