Skip to content

Commit

Permalink
[github actions] Publish (pre)release on 'v*' tag push
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbooth committed Mar 13, 2022
1 parent ba9ddc4 commit cd4661d
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Tagged Pre-Release

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+-*"

jobs:
tagged-prerelease:
name: "Tagged Pre-Release"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Add NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
- name: Restore dependencies
run: dotnet restore
- name: Publish
run: dotnet publish -c Release -r linux-x64 --self-contained true
- name: Publish Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Tagged Release

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
tagged-release:
name: "Tagged Release"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Add NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
- name: Restore dependencies
run: dotnet restore
- name: Publish
run: dotnet publish -c Release -r linux-x64 --self-contained true
- name: Publish Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false

0 comments on commit cd4661d

Please sign in to comment.