Skip to content

Commit

Permalink
ci(release): Update various github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Histalek committed Oct 2, 2024
1 parent aad0819 commit b0e0e9a
Showing 1 changed file with 28 additions and 36 deletions.
64 changes: 28 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,34 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
run: sudo apt-get install -y mono-complete
- name: Install dependencies
run: nuget install -o packages
- name: Build executable
run: msbuild -p:Configuration=Release
- name: Set release version env var
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: NeoDoc-${{ env.RELEASE_VERSION }}
# A file, directory or wildcard pattern that describes what to upload
path: bin/Release/*
retention-days: 90
- name: Login to GitHub Registry
uses: docker/login-action@v1
with:
registry: docker.pkg.github.com
username: $GITHUB_ACTOR
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/[email protected]
with:
# Build's context is the set of files located in the specified PATH or URL
context: .
# List of tags
tags: docker.pkg.github.com/ttt-2/neodoc/neodoc:${{ env.RELEASE_VERSION }}
# Always attempt to pull a newer version of the image
pull: true
load: true
- name: Push docker image
run: docker push docker.pkg.github.com/ttt-2/neodoc/neodoc:${{ env.RELEASE_VERSION }}
- uses: actions/checkout@v4
- name: Setup .NET Core
run: sudo apt-get install -y mono-complete
- name: Install dependencies
run: nuget install -o packages
- name: Build executable
run: msbuild -p:Configuration=Release
- name: Set release version env var
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: NeoDoc-${{ env.RELEASE_VERSION }}
path: bin/Release/*
retention-days: 90
- name: Login to GitHub Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v6
with:
tags: ghcr.io/ttt-2/neodoc/neodoc:${{ env.RELEASE_VERSION }}
pull: true
push: true
load: true

0 comments on commit b0e0e9a

Please sign in to comment.