Skip to content

Commit 1cfce33

Browse files
authored
Merge pull request #6 from djgoku/chore/switch-to-mise
Non-functional changes, only CI/CD changes
2 parents 45d26ca + 9b613e4 commit 1cfce33

File tree

8 files changed

+276
-411
lines changed

8 files changed

+276
-411
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
name: main
21
on:
2+
workflow_dispatch:
33
push:
4-
branches:
5-
- main
6-
tags:
7-
- '**'
4+
tags: ["*"]
5+
branches: ["main"]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
811
env:
12+
MISE_EXPERIMENTAL: true
913
DEVBOX_API_TOKEN: ${{ secrets.DEVBOX_API_TOKEN }}
1014
GH_TOKEN: ${{ secrets.GH_TOKEN }}
1115
jobs:
1216
release:
1317
runs-on: ubuntu-latest
14-
if: |
15-
github.repository_owner == 'djgoku' &&
16-
(
17-
(!startsWith(github.ref, 'refs/tags/')) ||
18-
(startsWith(github.ref, 'refs/tags/') && github.actor == 'djgoku')
19-
)
18+
timeout-minutes: 10
2019
steps:
2120
- uses: actions/checkout@v4
2221
- name: Install devbox with empty devbox.json
2322
uses: jetify-com/[email protected]
2423
with:
2524
enable-cache: 'true'
26-
- name: upload release artifacts
27-
run: |
28-
set -x
29-
devbox run do-all
30-
devbox run version-info
25+
- name: build and upload release artifacts
26+
uses: jdx/mise-action@v2
27+
- run: |
28+
devbox run -- mise run do-all
29+
mise exec -- elixir version-info.exs

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
env:
10+
MISE_EXPERIMENTAL: true
11+
DEVBOX_API_TOKEN: ${{ secrets.DEVBOX_API_TOKEN }}
12+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 10
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: build and upload release artifacts
20+
uses: jdx/mise-action@v2
21+
- run: |
22+
mise run test

devbox.json

Lines changed: 6 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,14 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.14.0/.schema/devbox.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
33
"packages": {
4-
"beam.packages.erlang_27.elixir_1_18": "",
5-
"erlang": "latest",
6-
"beam27Packages.elixir-ls": "0.26.4",
7-
"git": "latest",
8-
"zig": "latest",
9-
"xz": "latest",
10-
"_7zz": "latest",
11-
"github-cli": "latest",
12-
"curl": "latest",
4+
"git": "latest",
5+
"xz": "latest",
6+
"_7zz": "latest",
7+
"curl": "latest",
138
"darwin.apple_sdk.frameworks.CoreServices": {
149
"platforms": [
1510
"aarch64-darwin",
16-
"x86_64-darwin",
17-
],
18-
},
19-
"act": "latest",
20-
},
21-
"env": {
22-
"ELIXIR_ERL_OPTIONS": "+fnu",
23-
},
24-
"shell": {
25-
"init_hook": [
26-
"mkdir -p .nix-mix",
27-
"mkdir -p .nix-hex",
28-
"export MIX_HOME=$PWD/.nix-mix",
29-
"export HEX_HOME=$PWD/.nix-hex",
30-
"export ERL_AFLAGS='-kernel shell_history enabled'",
31-
"mix local.hex --force",
32-
"mix local.rebar --force",
33-
],
34-
"scripts": {
35-
"escript": [
36-
"MIX_ENV=escript mix escript.build"
37-
],
38-
"do-all": [
39-
"mix deps.get --only prod",
40-
"mix test",
41-
"mix format --check-formatted",
42-
"MIX_ENV=prod mix release --overwrite"
43-
],
44-
"version-info-only": [
45-
"MIX_APPLICATION_VERSION=$(elixir -e 'Regex.run(~r/version: \"(.*)\"/, File.read!(\"mix.exs\"), capture: :all_but_first) |> List.first() |> IO.puts()')",
46-
"echo \"version '$MIX_APPLICATION_VERSION'\""
47-
],
48-
"version-info": [
49-
"MIX_APPLICATION_VERSION=$(elixir -e 'Regex.run(~r/version: \"(.*)\"/, File.read!(\"mix.exs\"), capture: :all_but_first) |> List.first() |> IO.puts()')",
50-
"echo \"version '$MIX_APPLICATION_VERSION'\"",
51-
"cd burrito_out",
52-
"bash -c 'for file in *_*; do mv \"$file\" \"${file//_/-}\"; done'",
53-
"shasum -a 256 ./* > aws-sso-config-generator-checksums.txt",
54-
"cd -",
55-
"gh release create ${MIX_APPLICATION_VERSION} --generate-notes",
56-
"gh release upload ${MIX_APPLICATION_VERSION} ./burrito_out/* -R djgoku/aws-sso-config-generator"
11+
"x86_64-darwin"
5712
]
5813
}
5914
}

0 commit comments

Comments
 (0)