Skip to content

Commit

Permalink
Migrate to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkomandy committed Nov 6, 2023
1 parent 6e97449 commit dd94a29
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
steps:
- name: checkout repo
uses: actions/checkout@master
- name: build application
run: make
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: release
on:
push:
tags:
- 'v[0-9]+.*'
jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
build:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
steps:
- name: checkout repo
uses: actions/checkout@master
- name: build application
run: make
- name: Upload release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
# This is how it will be named on the release page. Put hatever name
# you like, remember that they need to be different for each platform.
# You can choose any build matrix parameters. For Rust I use the
# target triple.
asset_name: hideur_maikeur-${{ matrix.config.os }}
# The path to the file you want to upload.
asset_path: ./hideur
# probably you will need to change it, but most likely you are
# uploading a binary file
asset_content_type: application/octet-stream
3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

0 comments on commit dd94a29

Please sign in to comment.