-
Notifications
You must be signed in to change notification settings - Fork 12
144 lines (142 loc) · 5.5 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: release
on:
push:
branches: ["feature/e2e-test-macos"]
jobs:
# artifacts:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: denoland/setup-deno@main
# with:
# deno-version: "~1.37"
# - uses: actions/cache@v3
# with:
# path: ~/.cache/deno # see https://deno.land/manual/linking_to_external_code
# key: ${{ runner.os }}-deno # it seems there's no particular cache keying required
# restore-keys: |
# ${{ runner.os }}-deno
# - run: ./build.sh
# - name: upload x86_64-unknown-linux-gnu
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ./bin/collie-x86_64-unknown-linux-gnu.tar.gz
# asset_name: collie-x86_64-unknown-linux-gnu.tar.gz
# asset_content_type: application/gzip
# - name: upload x86_64-apple-darwin
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ./bin/collie-x86_64-apple-darwin.tar.gz
# asset_name: collie-x86_64-apple-darwin.tar.gz
# asset_content_type: application/gzip
# - name: upload aarch64-apple-darwin
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ./bin/collie-aarch64-apple-darwin.tar.gz
# asset_name: collie-aarch64-apple-darwin.tar.gz
# asset_content_type: application/gzip
# - name: upload x86_64-pc-windows-msvc
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ./bin/collie-x86_64-pc-windows-msvc.exe
# asset_name: collie-x86_64-pc-windows-msvc.exe
# asset_content_type: application/vnd.microsoft.portable-executable
#
# these e2e tests are super basic and just checks whether collie blows up
# e2e-windows:
# runs-on: windows-latest
# needs: artifacts
# steps:
# - uses: actions/checkout@v4
# - name: install dependencies
# uses: crazy-max/ghaction-chocolatey@v3
# # note: all other dependencies are installed in the image already
# with:
# args: install --force terraform terragrunt terraform-docs
# - name: install collie
# shell: pwsh
# env:
# COLLIE_VERSION: ${{ github.event.release.tag_name }}
# run: |
# irm https://raw.githubusercontent.com/meshcloud/collie-cli/main/install.ps1 | iex
#
# # github doesn't allow adding to PATH any other way, see https://stackoverflow.com/a/71579543/125407
# Add-Content $env:GITHUB_PATH "C:\Users\runneradmin\collie-cli"
# - name: collie info
# shell: pwsh
# run: |
# collie info
# - name: test
# shell: pwsh
# run: .\test\e2e.ps1
# e2e-linux:
# runs-on: ubuntu-latest
# needs: artifacts
# steps:
# - uses: actions/checkout@v4
# - name: install dependencies
# # note: we forego default.nix and to be as close to a realistic user experience as possible
# # all the other dependencies are already present on the runner images, so we use those
# # and just install the missing ones via nix
# uses: cachix/install-nix-action@v18
# with:
# nix_path: nixpkgs=channel:nixos-unstable
# extra_nix_config: |
# access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
# - uses: rrbutani/use-nix-shell-action@v1
# with:
# packages: terragrunt terraform-docs
# - name: install collie
# env:
# COLLIE_VERSION: ${{ github.event.release.tag_name }}
# run: |
# curl -sf -L https://raw.githubusercontent.com/meshcloud/collie-cli/main/install.sh | sudo bash
# - name: collie info
# run: |
# collie info
# - name: test
# run: |
# ./test/e2e.sh
e2e-macos:
runs-on: macos-latest
#needs: artifacts
steps:
- uses: actions/checkout@v4
- name: install dependencies
# note: we forego default.nix and to be as close to a realistic user experience as possible
# all the other dependencies are already present on the runner images, so we use those
# and just install the missing ones via nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: workflow/[email protected]
with:
packages: terraform,terragrunt,terraform-docs
script: |
curl -sf -L https://raw.githubusercontent.com/meshcloud/collie-cli/main/install.sh | sudo bash
collie info
./test/e2e.sh
env:
COLLIE_VERSION: ${{ github.event.release.tag_name }}
# run: |
# curl -sf -L https://raw.githubusercontent.com/meshcloud/collie-cli/main/install.sh | sudo bash
# - name: collie info
# run: |
# collie info
# - name: test
# run: |
# ./test/e2e.sh