Skip to content

Commit

Permalink
Merge pull request #14 from reload/automate-stuff
Browse files Browse the repository at this point in the history
automate stuff
  • Loading branch information
blyme authored Oct 25, 2023
2 parents 86c3195 + 4044e5f commit 4a51e75
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: npm
directory: /test
schedule:
interval: monthly
timezone: Europe/Copenhagen
reviewers:
- "reload/developers"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
timezone: Europe/Copenhagen
reviewers:
- "reload/developers"
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release
on:
push:
branches: main

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Bump version and push tag
uses: anothrNick/[email protected]
id: version
env:
GITHUB_TOKEN: ${{ github.token }}
WITH_V: true
DEFAULT_BUMP: patch
- name: Major version tag
id: major-version
if: ${{ (steps.version.outputs.new_tag != '') }}
uses: actions/github-script@v6
with:
script: |
core.setOutput('tag', '${{ steps.version.outputs.new_tag }}'.split('.')[0])
- name: Tag major version ${{ steps.major-version.outputs.tag }}
if: ${{ (steps.version.outputs.new_tag != '') }}
run: |
git tag --force ${{ steps.major-version.outputs.tag }}
git push origin ${{ steps.major-version.outputs.tag }} --force
- name: Create/update major version release
if: ${{ (steps.version.outputs.new_tag != '') }}
uses: ncipollo/release-action@v1
with:
token: ${{ github.token }}
allowUpdates: true
generateReleaseNotes: true
tag: ${{ steps.major-version.outputs.tag }}
name: ${{ steps.major-version.outputs.tag }} (${{ steps.version.outputs.new_tag }})
- name: Create release ${{ steps.version.outputs.new_tag }}
if: ${{ (steps.version.outputs.new_tag != '') }}
uses: ncipollo/release-action@v1
with:
token: ${{ github.token }}
generateReleaseNotes: true
tag: ${{ steps.version.outputs.new_tag }}
name: Release ${{ steps.version.outputs.new_tag }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
cache: 'npm'
cache-dependency-path: ./test/package-lock.json

Expand All @@ -26,5 +26,5 @@ jobs:
- name: JSTS Quality
uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ github.token }}
working_directory: ./test

0 comments on commit 4a51e75

Please sign in to comment.