Skip to content

Merge pull request #43 from qvalentin/feat-helmfile-crash #7

Merge pull request #43 from qvalentin/feat-helmfile-crash

Merge pull request #43 from qvalentin/feat-helmfile-crash #7

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 }}
outputs:
version: ${{ steps.build.outputs.version }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Install go dependencies
run: go mod tidy
- name: Build artifacts
id: build
run: |
make build-artifacts
printf '::set-output name=version::%s\n' "$(./dist/helm_ls_linux_amd64 version)"
- name: 'Upload macOS-amd64 artifact'
uses: actions/upload-artifact@v2
with:
name: helm_ls_darwin_amd64
path: ./dist/helm_ls-darwin-10.12-amd64
retention-days: 1
- name: 'Upload linux/amd64 artifact'
uses: actions/upload-artifact@v2
with:
name: helm_ls_linux_amd64
path: ./dist/helm_ls-linux-amd64
retention-days: 1
- name: 'Upload linux/arm artifact'
uses: actions/upload-artifact@v2
with:
name: helm_ls_linux_arm
path: ./dist/helm_ls-linux-arm64
retention-days: 1
- name: 'Upload windows/amd64 artifact'
uses: actions/upload-artifact@v2
with:
name: helm_ls_windows_amd64
path: ./dist/helm_ls-windows-4.0-amd64.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-linux-amd64 > 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-windows-4.0-amd64.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-darwin-10.12-amd64 > helm_ls_darwin_amd64.sha256sum
echo "SHA_MACOS=$(cat helm_ls_darwin_amd64.sha256sum)" >> $GITHUB_ENV
- name: Generate Linux-ARM SHA256 checksums
run: |
sha256sum helm_ls_linux_arm/helm_ls-linux-arm64 > 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-darwin-10.12-amd64
helm_ls_darwin_amd64.sha256sum:./helm_ls_darwin_amd64.sha256sum
helm_ls_windows_amd64:./helm_ls_windows_amd64/helm_ls-windows-4.0-amd64.exe
helm_ls_windows_amd64.sha256sum:./helm_ls_windows_amd64.sha256sum
helm_ls_linux_amd64:./helm_ls_linux_amd64/helm_ls-linux-amd64
helm_ls_linux_amd64.sha256sum:./helm_ls_linux_amd64.sha256sum
helm_ls_linux_arm:./helm_ls_linux_arm/helm_ls-linux-arm64
helm_ls_linux_arm.sha256sum:./helm_ls_linux_arm.sha256sum
body: |
```
${{ needs.artifacts.outputs.version }}
```
### macOS (x64)
1. Download **helm_ls_darwin_amd64**
2. Run `./helm_ls_darwin_amd64`
### 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 }}
${{ env.SHA_WINDOWS_64 }}
${{ env.SHA_LINUX_ARM }}
```