Skip to content

Release

Release #25

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for release'
required: true
default: master
push:
branches:
- master
tags:
- v*
jobs:
artifacts:
name: artifacts
strategy:
matrix:
go-version: [1.19.1]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: build
run: |
make build-release
- name: 'Upload macOS-amd64 artifact'
uses: actions/upload-artifact@v2
with:
name: helm_ls_darwin_amd64
path: ./dist/darwin-amd64_darwin_amd64_v1/helm-ls
retention-days: 1
- name: 'Upload macOS-arm64 artifact'
uses: actions/upload-artifact@v2
with:
name: helm_ls_darwin_arm64
path: ./dist/darwin-arm64_darwin_arm64/helm-ls
retention-days: 1
- name: 'Upload linux/amd64 artifact'
uses: actions/upload-artifact@v2
with:
name: helm_ls_linux_amd64
path: ./dist/linux-amd64_linux_amd64_v1/helm-ls
retention-days: 1
- name: 'Upload linux/arm artifact'
uses: actions/upload-artifact@v2
with:
name: helm_ls_linux_arm
path: ./dist/linux-arm64_linux_arm64/helm-ls
retention-days: 1
- name: 'Upload windows/amd64 artifact'
uses: actions/upload-artifact@v2
with:
name: helm_ls_windows_amd64
path: ./dist/windows-amd64_windows_amd64_v1/helm-ls.exe
retention-days: 1
publish:
needs: [artifacts]
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- uses: actions/download-artifact@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
- if: github.event_name == 'schedule'
run: echo 'TAG_NAME=master' >> $GITHUB_ENV
- if: github.event_name == 'push'
run: |
TAG_NAME=${{ github.ref }}
echo "TAG_NAME=${TAG_NAME#refs/*/}" >> $GITHUB_ENV
- name: Generate Linux-64 SHA256 checksums
run: |
sha256sum helm_ls_linux_amd64/helm-ls > helm_ls_linux_amd64.sha256sum
echo "SHA_LINUX_64=$(cat helm_ls_linux_amd64.sha256sum)" >> $GITHUB_ENV
- name: Generate Windows-64 SHA256 checksums
run: |
sha256sum helm_ls_windows_amd64/helm-ls.exe > helm_ls_windows_amd64.sha256sum
echo "SHA_WINDOWS_64=$(cat helm_ls_windows_amd64.sha256sum)" >> $GITHUB_ENV
- name: Generate macOS-amd64 SHA256 checksums
run: |
sha256sum helm_ls_darwin_amd64/helm-ls > helm_ls_darwin_amd64.sha256sum
echo "SHA_MACOS_AMD64=$(cat helm_ls_darwin_amd64.sha256sum)" >> $GITHUB_ENV
- name: Generate macOS-arm64 SHA256 checksums
run: |
sha256sum helm_ls_darwin_arm64/helm-ls > helm_ls_darwin_arm64.sha256sum
echo "SHA_MACOS_ARM64=$(cat helm_ls_darwin_arm64.sha256sum)" >> $GITHUB_ENV
- name: Generate Linux-ARM SHA256 checksums
run: |
sha256sum helm_ls_linux_arm/helm-ls > helm_ls_linux_arm.sha256sum
echo "SHA_LINUX_ARM=$(cat helm_ls_linux_arm.sha256sum)" >> $GITHUB_ENV
- if: env.TAG_NAME == 'master'
run: echo 'SUBJECT=HelmLs development (prerelease) build' >> $GITHUB_ENV
- if: env.TAG_NAME != 'master'
run: echo 'SUBJECT=${{ env.TAG_NAME }}' >> $GITHUB_ENV
- uses: meeDamian/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.TAG_NAME }}
name: ${{ env.SUBJECT }}
prerelease: ${{ env.TAG_NAME == 'master' }}
commitish: ${{ github.sha }}
gzip: false
allow_override: true
files: |
helm_ls_darwin_amd64:./helm_ls_darwin_amd64/helm-ls
helm_ls_darwin_amd64.sha256sum:./helm_ls_darwin_amd64.sha256sum
helm_ls_darwin_arm64:./helm_ls_darwin_arm64/helm-ls
helm_ls_darwin_arm64.sha256sum:./helm_ls_darwin_arm64.sha256sum
helm_ls_windows_amd64.exe:./helm_ls_windows_amd64/helm-ls.exe
helm_ls_windows_amd64.sha256sum:./helm_ls_windows_amd64.sha256sum
helm_ls_linux_amd64:./helm_ls_linux_amd64/helm-ls
helm_ls_linux_amd64.sha256sum:./helm_ls_linux_amd64.sha256sum
helm_ls_linux_arm:./helm_ls_linux_arm/helm-ls
helm_ls_linux_arm.sha256sum:./helm_ls_linux_arm.sha256sum
body: |
### macOS (x64)
1. Download **helm_ls_darwin_amd64**
2. Run `./helm_ls_darwin_amd64`
### macOS (ARM)
1. Download **helm_ls_darwin_arm64**
2. Run `./helm_ls_darwin_arm64`
### windows (x64)
1. Download **helm_ls_windows_amd64.exe**
2. Run `./helm_ls_windows_amd64.exe`
### Linux (x64)
1. Download **helm_ls_linux_amd64**
2. Run `./helm_ls_linux_amd64`
### Linux (ARM)
1. Download **helm_ls_linux_arm**
2. Run `./helm_ls_linux_arm`
## SHA256 Checksums
```
${{ env.SHA_LINUX_64 }}
${{ env.SHA_MACOS_AMD64 }}
${{ env.SHA_MACOS_ARM64 }}
${{ env.SHA_WINDOWS_64 }}
${{ env.SHA_LINUX_ARM }}
```