mirror of
https://github.com/AGWA/git-crypt.git
synced 2025-12-24 12:02:56 -08:00
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
on:
|
|
release:
|
|
types: [published]
|
|
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@v2
|
|
- name: Install dependencies
|
|
run: sudo apt install libssl-dev
|
|
- name: Build binary
|
|
run: make
|
|
- name: Upload release artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: git-crypt-artifacts
|
|
path: git-crypt
|
|
upload:
|
|
name: Upload Release Binary
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Download release artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: git-crypt-artifacts
|
|
- name: Upload release asset
|
|
uses: actions/github-script@v3
|
|
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'),
|
|
});
|