Skip to content

Commit

Permalink
add: main release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
momeemt committed Jun 12, 2024
1 parent d99c196 commit d52b550
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: main
on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix profile install nixpkgs#gh
- run: |
echo "${ secrets.GITHUB_TOKEN }" | gh auth login --with-token
- name: Get current version
id: version
run: echo "version=$(cat ./VERSION)" >> $GITHUB_OUTPUT

- run: nix build

- name: Create Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version }}
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./result/std.html.wasm
asset_name: std.html.wasm
asset_content_type: application/wasm

0 comments on commit d52b550

Please sign in to comment.