Skip to content

fix: Update Windows release workflow to hand open ssl issue #7

fix: Update Windows release workflow to hand open ssl issue

fix: Update Windows release workflow to hand open ssl issue #7

Workflow file for this run

on:
release:
types: [published]
push:
branches:
- master
name: Build Release Binary (Linux)
jobs:
build:
name: Build Release Binary
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt install libssl-dev
- name: Build binary
run: make
- name: artifacts name
id: artifacts-name
env:
IS_RELEASE: ${{ github.event_name == 'release' }}
run: |
if [ "$IS_RELEASE" = true ]; then
echo "artifacts-name=git-crypt-artifacts" >> $GITHUB_ENV
else
echo "artifacts-name=git-crypt-artifacts-dev" >> $GITHUB_ENV
fi
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifacts-name }}
path: git-crypt
upload:
name: Upload Release Binary
if: github.event_name == 'release'
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Download release artifact
uses: actions/download-artifact@v2
with:
name: git-crypt-artifacts
- name: Upload release asset
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require("fs").promises;
const { repo: { owner, repo }, sha } = context;
await github.repos.uploadReleaseAsset({
owner, repo,
release_id: ${{ github.event.release.id }},
name: 'git-crypt-${{ github.event.release.name }}-linux-x86_64',
data: await fs.readFile('git-crypt'),
});