git.iko.soy/rowtype-yoga/package-sets
on master help sign in
Move CI to GitHub Actions (#644)
commit0d6b19d97fc5f89122b9439f74e96652f55e3eb3 authorFabrizio Ferrai <fabrizio.ferrai@gmail.com> dateSat 20 Jun 2020, 21:19 (6 years ago) parent9266831
3 files changed+53−24
.github/workflows/main.yml+18 .github/workflows/release.yml+35 .travis.yml−24
.github/workflows/main.ymlnew file+18
@@ -0,0 +1,18 @@
1+name: tests
2+
3+on:
4+ pull_request:
5+ push:
6+jobs:
7+ tests:
8+ runs-on: ubuntu-latest
9+ steps:
10+ - uses: actions/checkout@v2
11+ - uses: cachix/install-nix-action@v9
12+ - uses: actions/cache@v2
13+ with:
14+ path: |
15+ output
16+ .psc-package
17+ key: ${{ runner.os }}-build-products
18+ - run: nix-shell --run 'make ci'
.github/workflows/release.ymlnew file+35
@@ -0,0 +1,35 @@
1+name: release
2+
3+on:
4+ push:
5+ tags:
6+ - 'psc-*'
7+
8+jobs:
9+ build:
10+ runs-on: ubuntu-latest
11+ steps:
12+ - uses: actions/checkout@v2
13+ - uses: cachix/install-nix-action@v9
14+ - name: Render packages.dhall
15+ run: |
16+ nix-shell --run '>packages.dhall dhall <<< ./src/packages.dhall'
17+ - name: Create Release
18+ id: create_release
19+ uses: actions/create-release@v1
20+ env:
21+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+ with:
23+ tag_name: ${{ github.ref }}
24+ release_name: ${{ github.ref }}
25+ draft: false
26+ prerelease: false
27+ - name: Upload Release Asset
28+ id: upload-release-asset
29+ uses: actions/upload-release-asset@v1
30+ env:
31+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+ with:
33+ upload_url: ${{ steps.create_release.outputs.upload_url }}
34+ asset_path: ./packages.dhall
35+ asset_name: packages.dhall
.travis.ymldeleted−24
@@ -1,24 +0,0 @@
1−language: nix
2−
3−script:
4− - |
5− curl https://nixos.org/nix/install | sh
6− . "$HOME"/.nix-profile/etc/profile.d/nix.sh
7− nix-shell --run 'make ci'
8−
9−cache:
10− directories:
11− - .psc-package
12− - output
13−
14−before_deploy:
15− - nix-shell --run '>packages.dhall dhall <<< ./src/packages.dhall'
16−
17−deploy:
18− provider: releases
19− api_key: $RELEASE_KEY
20− file:
21− - packages.dhall
22− skip_cleanup: true
23− on:
24− tags: true