Skip to content

Commit

Permalink
Create publish-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
frie321984 authored Mar 29, 2024
1 parent 209e468 commit 6a78c20
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Release
on:
push:
branches: [ main ]
tags-ignore:
- '*'

jobs:
integration-test:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create a Release
uses: elgohr/Github-Release-Action@main
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
title: ${{ github.sha }}

release:
runs-on: ubuntu-latest
needs:
- integration-test
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_TOKEN }} # for pushing to protected branch
- name: Publish new version
run: |
git config --global user.email "[email protected]"
git config --global user.name "Release Bot"
git tag -fa ${{ github.sha }} -m "Update tag"
git push origin ${{github.sha}} --force

0 comments on commit 6a78c20

Please sign in to comment.