Skip to content

Commit

Permalink
Merge pull request #25 from bl3rune/auto-version-workflow
Browse files Browse the repository at this point in the history
Update workflow to auto version bump and release
  • Loading branch information
bl3rune authored Jun 12, 2024
2 parents 8fdcb22 + 094c5c3 commit 0032ddc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: docker publish
name: publish

on:
push:
branches:
- main

jobs:
docker:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
uses: actions/checkout@v4
- run: git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- run: git config user.name "$GITHUB_ACTOR"
- run: npm version patch -m "v%s"
- run: VERSION=$(node -p "require('./package.json').version")
- run: git tag ${VERSION}
- run: git push "https://$GITHUB_ACTOR:${{ secrets.ACCESS_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" --follow-tags
- run: git push "https://$GITHUB_ACTOR:${{ secrets.ACCESS_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" --tags
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
Expand All @@ -28,8 +32,7 @@ jobs:
uses: docker/build-push-action@v2
with:
push: true
tags: bl3rune/gamedig-discord-bot:latest,bl3rune/gamedig-discord-bot:${{steps.package-version.outputs.current-version}}
- uses: actions/checkout@v2
tags: bl3rune/gamedig-discord-bot:latest,bl3rune/gamedig-discord-bot:${VERSION}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v2
with:
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": "gamedig-discord-bot",
"version": "1.4.3",
"version": "1.5.0",
"description": "Discord Bot for realtime gamedig server queries",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit 0032ddc

Please sign in to comment.