@@ -14,21 +14,24 @@ jobs:
1414 runs-on : ${{ matrix.config.os }}
1515 strategy :
1616 fail-fast : false
17+ max-parallel : 1
1718 matrix :
1819 config :
20+ - os : " macOS-latest"
21+ dir : osx64
22+ arch : darwin-arm64
23+ artifacts : " plc"
24+ RUSTFLAGS : " -Dwarnings"
1925 - os : " ubuntu-latest"
2026 dir : linux64
2127 debdir : pivot-lang_0.1.0-1_amd64
2228 artifacts : " plc"
29+ arch : linux-amd64
2330 RUSTFLAGS : " -Dwarnings"
2431 # - os: "windows-latest"
2532 # dir: win64
2633 # artifacts: "plc.exe"
2734 # RUSTFLAGS: "-Dwarnings -Ctarget-feature=+crt-static"
28- - os : " macOS-latest"
29- dir : osx64
30- artifacts : " plc"
31- RUSTFLAGS : " -Dwarnings"
3235 steps :
3336 - uses : actions/checkout@v3
3437 with :
@@ -220,7 +223,7 @@ jobs:
220223 run : |
221224 import os
222225 src = os.environ['OUT_DIR']
223- dst = os.environ['OS'] + "-artifact .tar.gz"
226+ dst = "pivot-lang-0.1.${{ github.run_number }}-${{ matrix.config.arch }} .tar.gz"
224227 os.system("tar -czvf %s %s" % (dst, src))
225228 shell : python
226229 - name : Set outputs
@@ -229,8 +232,84 @@ jobs:
229232 - uses : ncipollo/release-action@v1
230233 name : upload
231234 with :
232- artifacts : ${{ matrix.config.os }}-artifact .tar.gz
235+ artifacts : " pivot-lang-0.1. ${{ github.run_number }}-${{ matrix.config.arch }}.tar.gz"
233236 allowUpdates : true
234237 replacesArtifacts : false
235238 commit : master
236- tag : cibuild-v${{ github.run_number }}@${{ steps.vars.outputs.sha_short }}
239+ tag : v0.1.${{ github.run_number }}
240+
241+ - name : Release my project to my Homebrew tap
242+ if : ${{ matrix.config.os == 'ubuntu-latest' }}
243+ uses : Pivot-Studio/homebrew-releaser@main
244+ with :
245+ # The name of the homebrew tap to publish your formula to as it appears on GitHub.
246+ # Required - strings.
247+ homebrew_owner : Pivot-Studio
248+ homebrew_tap : homebrew-tap
249+
250+ # The name of the folder in your homebrew tap where formula will be committed to.
251+ # Default is shown - string.
252+ # formula_folder: pivot-lang
253+
254+ # The GitHub Token (saved as a repo secret) that has `repo` permissions for the homebrew tap you want to release to.
255+ # Required - string.
256+ github_token : ${{ secrets.PAT }}
257+
258+ # Git author info used to commit to the homebrew tap.
259+ # Defaults are shown - strings.
260+ commit_owner : pivot-lang authors
261+ 262+
263+ # Custom dependencies in case other formulas are needed to build the current one.
264+ # Optional - multiline string.
265+ depends_on : |
266+ "llvm@14"
267+
268+ # Custom install command for your formula.
269+ # Required - string.
270+ install : |
271+ lib.install Dir["./planglib"]
272+ lib.install "./libvm.a"
273+ bin.install "./plc"
274+
275+
276+ # Custom test command for your formula so you can run `brew test`.
277+ # Optional - string.
278+ # test: 'assert_match("my script output", shell_output("my-script-command"))'
279+
280+ # Adds URL and checksum targets for different OS and architecture pairs. Using this option assumes
281+ # a tar archive exists on your GitHub repo with the following URL pattern (this cannot be customized):
282+ # https://github.com/{GITHUB_OWNER}/{REPO_NAME}/releases/download/{TAG}/{REPO_NAME}-{VERSION}-{OPERATING_SYSTEM}-{ARCHITECTURE}.tar.gz'
283+ # Darwin AMD pre-existing path example: https://github.com/justintime50/myrepo/releases/download/v1.2.0/myrepo-1.2.0-darwin-amd64.tar.gz
284+ # Linux ARM pre-existing path example: https://github.com/justintime50/myrepo/releases/download/v1.2.0/myrepo-1.2.0-linux-arm64.tar.gz
285+ # Optional - booleans.
286+ # target_darwin_amd64: true
287+ target_darwin_arm64 : true
288+ # target_linux_amd64: true
289+ # target_linux_arm64: false
290+
291+ # Update your homebrew tap's README with a table of all projects in the tap.
292+ # This is done by pulling the information from all your formula.rb files - eg:
293+ #
294+ # | Project | Description | Install |
295+ # | ------------------------------------------ | ------------ | ------------------------ |
296+ # | [formula_1](https://github.com/user/repo1) | helpful text | `brew install formula_1` |
297+ # | [formula_2](https://github.com/user/repo2) | helpful text | `brew install formula_2` |
298+ # | [formula_3](https://github.com/user/repo3) | helpful text | `brew install formula_3` |
299+ #
300+ # Simply place the following in your README or wrap your project in these comment tags:
301+ # <!-- project_table_start -->
302+ # TABLE HERE
303+ # <!--project_table_end -->
304+ #
305+ # Finally, mark `update_readme_table` as `true` in your GitHub Action config and we'll do the work of building a custom table for you.
306+ # Default is `false` - boolean.
307+ update_readme_table : true
308+
309+ # Skips committing the generated formula to a homebrew tap (useful for local testing).
310+ # Default is shown - boolean.
311+ skip_commit : false
312+
313+ # Logs debugging info to console.
314+ # Default is shown - boolean.
315+ debug : true
0 commit comments