Skip to content

Commit

Permalink
Add a GitHub action to create a release from a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Maska committed Jul 24, 2023
1 parent a3171b2 commit e7626e9
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@ on:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_call:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Run the build script
run: ./build.sh

- name: Store build artifacts
uses: actions/upload-artifact@v3
with:
name: release-dir
path: release/
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release BOFH

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/build.yml

release:
needs: build
permissions:
contents: write
runs-on: ubuntu-latest

steps:
- name: Fetch build artifacts
uses: actions/download-artifact@v3
with:
name: release-dir
- name: Create zip
uses: TheDoctor0/[email protected]
with:
type: zip
filename: bofh-release.zip
exclusions: '*.git*'

- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: bofh-release.zip

0 comments on commit e7626e9

Please sign in to comment.