Skip to content

Merge pull request #3 from emic/develop #1

Merge pull request #3 from emic/develop

Merge pull request #3 from emic/develop #1

Workflow file for this run

name: release
on:
push:
tags:
- '*'
jobs:
build:
name: Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
go: [ '1.22' ]
steps:
- name: Setup go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache: false
go-version: ${{ matrix.go }}
- uses: actions/checkout@v4
- run: make dist
- name: Set version
id: version
run: |
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
echo ::set-output name=version::$VERSION
- name: Create release
id: create_release
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version }}
release_name: XMLPaste ${{ steps.version.outputs.version }} Released
draft: true
prerelease: false
- name: Upload Release Asset for Windows (x64)
id: upload-release-asset-for-windows-x64
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/xmlpaste-${{ steps.version.outputs.version }}-windows-x64.zip
asset_name: xmlpaste-${{ steps.version.outputs.version }}-windows-x64.zip
asset_content_type: application/zip