Skip to content

updated build

updated build #10

Workflow file for this run

name: Release
on:
push:
branches:
- master
permissions:
contents: write
actions: read
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Build
run: |
go build -v -o webring cmd/server/main.go
- name: Create Tag
id: create_tag
run: |
TAG_NAME="v-$(echo ${{ github.sha }} | cut -c1-7)"
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
git tag $TAG_NAME
git push origin $TAG_NAME
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
tag_name: ${{ steps.create_tag.outputs.tag_name }}
release_name: Release ${{ steps.create_tag.outputs.tag_name }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./webring
asset_name: webring
asset_content_type: application/octet-stream
- name: Upload Binary to Repository
uses: actions/upload-artifact@v2
with:
name: webring
path: webring