Skip to content

Commit

Permalink
ops: github release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dev6699 committed Oct 14, 2023
1 parent 14c053b commit c9e5e38
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
push:
tags:
- "v*.*.*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pre-build image and build release in devcontainer
uses: devcontainers/[email protected]
env:
# To fix ${localEnv:XAUTHORITY} mount error
XAUTHORITY: /tmp
with:
imageName: ghcr.io/dev6699/rspy-devcontainer
cacheFrom: ghcr.io/dev6699/rspy-devcontainer
push: always
runCmd: go build -o rspy main.go

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
rspy

0 comments on commit c9e5e38

Please sign in to comment.