Skip to content

Commit

Permalink
add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yeti0904 committed Apr 20, 2024
1 parent 63405d7 commit 99f805c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: D

on:
release:
types: [created]

permissions:
contents: write

jobs:
build:

runs-on: ${{matrix.os}}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: dlang-community/setup-dlang@4c99aa991ce7d19dd3064de0a4f2f6b2f152e2d7

- name: 'Build & Test'
run: |
# Build the project, with its main file included, without unittests
dub build -b release
- name: 'Archive'
run: |
zip cac-${{matrix.os}}.zip cac*
- name: Upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
upload_url: ${{github.events.release.upload_url}}
asset_path: cac-${{matrix.os}}.zip
asset_name: cac-${{matrix.os}}.zip
asset_content_type: application/gzip

0 comments on commit 99f805c

Please sign in to comment.