|
1 | | -name: Lucky CLI Release |
| 1 | +# name: Lucky CLI Release |
2 | 2 |
|
3 | | -permissions: |
4 | | - contents: write |
| 3 | +# permissions: |
| 4 | +# contents: write |
5 | 5 |
|
6 | | -on: |
7 | | - workflow_dispatch: |
8 | | - push: |
9 | | - tags: |
10 | | - # Semantic versions are allowed (i.e. `v1.2.3`) |
11 | | - - "v[0-9]+.[0-9]+.[0-9]+" |
12 | | - # Experimental versions are not allowed (i.e. `v1.2.3-experimental`) |
13 | | - - "!v[0-9]+.[0-9]+.[0-9]+-*" |
| 6 | +# on: |
| 7 | +# workflow_dispatch: |
| 8 | +# push: |
| 9 | +# tags: |
| 10 | +# # Semantic versions are allowed (i.e. `v1.2.3`) |
| 11 | +# - "v[0-9]+.[0-9]+.[0-9]+" |
| 12 | +# # Experimental versions are not allowed (i.e. `v1.2.3-experimental`) |
| 13 | +# - "!v[0-9]+.[0-9]+.[0-9]+-*" |
14 | 14 |
|
15 | | -jobs: |
16 | | - build-linux-amd64: |
17 | | - runs-on: ubuntu-latest |
18 | | - env: |
19 | | - FORCE_COLOR: 1 |
20 | | - EARTHLY_CI: 'true' |
21 | | - steps: |
22 | | - - uses: earthly/actions-setup@v1 |
23 | | - with: |
24 | | - version: v0.8.0 |
25 | | - - uses: actions/checkout@v5 |
26 | | - - name: Build and package |
27 | | - run: | |
28 | | - mkdir -p bin |
29 | | - earthly --artifact +release-static/lucky ./bin/lucky |
30 | | - sha256sum bin/lucky | awk '{print $1}' > ./bin/checksums.txt |
31 | | - tar -czvf lucky-$GITHUB_REF_NAME-linux-amd64.tar.gz -C ./bin . |
32 | | - - uses: actions/upload-artifact@v4 |
33 | | - with: |
34 | | - name: linux |
35 | | - path: lucky-${{ github.ref_name }}-linux-amd64.tar.gz |
36 | | - if-no-files-found: error |
| 15 | +# jobs: |
| 16 | +# build-linux-amd64: |
| 17 | +# runs-on: ubuntu-latest |
| 18 | +# env: |
| 19 | +# FORCE_COLOR: 1 |
| 20 | +# EARTHLY_CI: 'true' |
| 21 | +# steps: |
| 22 | +# - uses: earthly/actions-setup@v1 |
| 23 | +# with: |
| 24 | +# version: v0.8.0 |
| 25 | +# - uses: actions/checkout@v5 |
| 26 | +# - name: Build and package |
| 27 | +# run: | |
| 28 | +# mkdir -p bin |
| 29 | +# earthly --artifact +release-static/lucky ./bin/lucky |
| 30 | +# sha256sum bin/lucky | awk '{print $1}' > ./bin/checksums.txt |
| 31 | +# tar -czvf lucky-$GITHUB_REF_NAME-linux-amd64.tar.gz -C ./bin . |
| 32 | +# - uses: actions/upload-artifact@v4 |
| 33 | +# with: |
| 34 | +# name: linux |
| 35 | +# path: lucky-${{ github.ref_name }}-linux-amd64.tar.gz |
| 36 | +# if-no-files-found: error |
37 | 37 |
|
38 | | - build-windows-amd64: |
39 | | - runs-on: windows-latest |
40 | | - steps: |
41 | | - - uses: actions/checkout@v5 |
42 | | - - uses: crystal-lang/install-crystal@v1 |
43 | | - - uses: ilammy/msvc-dev-cmd@v1 |
44 | | - - name: Build and package |
45 | | - run: | |
46 | | - shards build lucky --without-development --no-debug --release --static |
47 | | - (Get-FileHash ./bin/lucky).Hash | Out-File ./bin/checksums.txt |
48 | | - Compress-Archive -Path ./bin/* -DestinationPath lucky-$env:GITHUB_REF_NAME-windows-amd64.zip |
49 | | - - uses: actions/upload-artifact@v4 |
50 | | - with: |
51 | | - name: windows |
52 | | - path: lucky-${{ github.ref_name }}-windows-amd64.zip |
53 | | - if-no-files-found: error |
| 38 | +# build-windows-amd64: |
| 39 | +# runs-on: windows-latest |
| 40 | +# steps: |
| 41 | +# - uses: actions/checkout@v5 |
| 42 | +# - uses: crystal-lang/install-crystal@v1 |
| 43 | +# - uses: ilammy/msvc-dev-cmd@v1 |
| 44 | +# - name: Build and package |
| 45 | +# run: | |
| 46 | +# shards build lucky --without-development --no-debug --release --static |
| 47 | +# (Get-FileHash ./bin/lucky).Hash | Out-File ./bin/checksums.txt |
| 48 | +# Compress-Archive -Path ./bin/* -DestinationPath lucky-$env:GITHUB_REF_NAME-windows-amd64.zip |
| 49 | +# - uses: actions/upload-artifact@v4 |
| 50 | +# with: |
| 51 | +# name: windows |
| 52 | +# path: lucky-${{ github.ref_name }}-windows-amd64.zip |
| 53 | +# if-no-files-found: error |
54 | 54 |
|
55 | | - release: |
56 | | - needs: |
57 | | - - build-linux-amd64 |
58 | | - - build-windows-amd64 |
59 | | - runs-on: ubuntu-latest |
60 | | - steps: |
61 | | - - uses: actions/checkout@v5 |
62 | | - - uses: actions/download-artifact@v4 |
63 | | - with: |
64 | | - path: artifacts |
65 | | - - name: Checksums |
66 | | - run: | |
67 | | - cd artifacts |
68 | | - sha256sum linux/lucky-$GITHUB_REF_NAME-linux-amd64.tar.gz | awk '{print $1}' > linux/lucky-$GITHUB_REF_NAME-linux-amd64.tar.gz.sha256 |
69 | | - sha256sum windows/lucky-$GITHUB_REF_NAME-windows-amd64.zip | awk '{print $1}' > windows/lucky-$GITHUB_REF_NAME-windows-amd64.zip.sha256 |
70 | | - - name: Release |
71 | | - uses: softprops/action-gh-release@v2 |
72 | | - with: |
73 | | - draft: true |
74 | | - fail_on_unmatched_files: true |
75 | | - files: | |
76 | | - artifacts/linux/lucky-${{ github.ref_name }}-linux-amd64.tar.gz |
77 | | - artifacts/linux/lucky-${{ github.ref_name }}-linux-amd64.tar.gz.sha256 |
78 | | - artifacts/windows/lucky-${{ github.ref_name }}-windows-amd64.zip |
79 | | - artifacts/windows/lucky-${{ github.ref_name }}-windows-amd64.zip.sha256 |
| 55 | +# release: |
| 56 | +# needs: |
| 57 | +# - build-linux-amd64 |
| 58 | +# - build-windows-amd64 |
| 59 | +# runs-on: ubuntu-latest |
| 60 | +# steps: |
| 61 | +# - uses: actions/checkout@v5 |
| 62 | +# - uses: actions/download-artifact@v4 |
| 63 | +# with: |
| 64 | +# path: artifacts |
| 65 | +# - name: Checksums |
| 66 | +# run: | |
| 67 | +# cd artifacts |
| 68 | +# sha256sum linux/lucky-$GITHUB_REF_NAME-linux-amd64.tar.gz | awk '{print $1}' > linux/lucky-$GITHUB_REF_NAME-linux-amd64.tar.gz.sha256 |
| 69 | +# sha256sum windows/lucky-$GITHUB_REF_NAME-windows-amd64.zip | awk '{print $1}' > windows/lucky-$GITHUB_REF_NAME-windows-amd64.zip.sha256 |
| 70 | +# - name: Release |
| 71 | +# uses: softprops/action-gh-release@v2 |
| 72 | +# with: |
| 73 | +# draft: true |
| 74 | +# fail_on_unmatched_files: true |
| 75 | +# files: | |
| 76 | +# artifacts/linux/lucky-${{ github.ref_name }}-linux-amd64.tar.gz |
| 77 | +# artifacts/linux/lucky-${{ github.ref_name }}-linux-amd64.tar.gz.sha256 |
| 78 | +# artifacts/windows/lucky-${{ github.ref_name }}-windows-amd64.zip |
| 79 | +# artifacts/windows/lucky-${{ github.ref_name }}-windows-amd64.zip.sha256 |
80 | 80 |
|
81 | | - homebrew-lucky: |
82 | | - needs: release |
83 | | - runs-on: ubuntu-latest |
84 | | - steps: |
85 | | - - uses: actions/checkout@v5 |
86 | | - - name: Generate app token |
87 | | - id: generate-token |
88 | | - uses: actions/create-github-app-token@v2 |
89 | | - with: |
90 | | - app-id: ${{ vars.APP_ID }} |
91 | | - private-key: ${{ secrets.APP_PRIVATE_KEY }} |
92 | | - - name: Trigger Release Workflow |
93 | | - run: | |
94 | | - url_="https://github.com/luckyframework/lucky_cli/archive/refs/tags/${{ github.ref_name }}.zip" |
95 | | - sha_="$(curl -sL $url_ | sha256sum | awk '{print $1}')" |
96 | | - version_="$(yq '.version' shard.yml)" |
| 81 | +# homebrew-lucky: |
| 82 | +# needs: release |
| 83 | +# runs-on: ubuntu-latest |
| 84 | +# steps: |
| 85 | +# - uses: actions/checkout@v5 |
| 86 | +# - name: Generate app token |
| 87 | +# id: generate-token |
| 88 | +# uses: actions/create-github-app-token@v2 |
| 89 | +# with: |
| 90 | +# app-id: ${{ vars.APP_ID }} |
| 91 | +# private-key: ${{ secrets.APP_PRIVATE_KEY }} |
| 92 | +# - name: Trigger Release Workflow |
| 93 | +# run: | |
| 94 | +# url_="https://github.com/luckyframework/lucky_cli/archive/refs/tags/${{ github.ref_name }}.zip" |
| 95 | +# sha_="$(curl -sL $url_ | sha256sum | awk '{print $1}')" |
| 96 | +# version_="$(yq '.version' shard.yml)" |
97 | 97 |
|
98 | | - set -x |
99 | | - gh workflow run release.yml \ |
100 | | - -R luckyframework/homebrew-lucky \ |
101 | | - -f url=$url_ \ |
102 | | - -f sha256=$sha_ \ |
103 | | - -f version=$version_ |
104 | | - env: |
105 | | - GH_TOKEN: ${{ steps.generate-token.outputs.token }} |
| 98 | +# set -x |
| 99 | +# gh workflow run release.yml \ |
| 100 | +# -R luckyframework/homebrew-lucky \ |
| 101 | +# -f url=$url_ \ |
| 102 | +# -f sha256=$sha_ \ |
| 103 | +# -f version=$version_ |
| 104 | +# env: |
| 105 | +# GH_TOKEN: ${{ steps.generate-token.outputs.token }} |
106 | 106 |
|
107 | | - scoop-lucky: |
108 | | - needs: release |
109 | | - runs-on: ubuntu-latest |
110 | | - steps: |
111 | | - - uses: actions/checkout@v5 |
112 | | - - name: Generate app token |
113 | | - id: generate-token |
114 | | - uses: actions/create-github-app-token@v2 |
115 | | - with: |
116 | | - app-id: ${{ vars.APP_ID }} |
117 | | - private-key: ${{ secrets.APP_PRIVATE_KEY }} |
118 | | - - name: Trigger Release Workflow |
119 | | - run: | |
120 | | - url_="https://github.com/luckyframework/lucky_cli/releases/download/${{ github.ref_name }}/lucky-${{ github.ref_name }}-windows-amd64.zip" |
121 | | - sha_="$(curl -sL $url_.sha256)" |
122 | | - version_="$(yq '.version' shard.yml)" |
| 107 | +# scoop-lucky: |
| 108 | +# needs: release |
| 109 | +# runs-on: ubuntu-latest |
| 110 | +# steps: |
| 111 | +# - uses: actions/checkout@v5 |
| 112 | +# - name: Generate app token |
| 113 | +# id: generate-token |
| 114 | +# uses: actions/create-github-app-token@v2 |
| 115 | +# with: |
| 116 | +# app-id: ${{ vars.APP_ID }} |
| 117 | +# private-key: ${{ secrets.APP_PRIVATE_KEY }} |
| 118 | +# - name: Trigger Release Workflow |
| 119 | +# run: | |
| 120 | +# url_="https://github.com/luckyframework/lucky_cli/releases/download/${{ github.ref_name }}/lucky-${{ github.ref_name }}-windows-amd64.zip" |
| 121 | +# sha_="$(curl -sL $url_.sha256)" |
| 122 | +# version_="$(yq '.version' shard.yml)" |
123 | 123 |
|
124 | | - set -x |
125 | | - gh workflow run release.yml \ |
126 | | - -R luckyframework/scoop-bucket \ |
127 | | - -f url=$url_ \ |
128 | | - -f sha256=$sha_ \ |
129 | | - -f version=$version_ |
130 | | - env: |
131 | | - GH_TOKEN: ${{ steps.generate-token.outputs.token }} |
| 124 | +# set -x |
| 125 | +# gh workflow run release.yml \ |
| 126 | +# -R luckyframework/scoop-bucket \ |
| 127 | +# -f url=$url_ \ |
| 128 | +# -f sha256=$sha_ \ |
| 129 | +# -f version=$version_ |
| 130 | +# env: |
| 131 | +# GH_TOKEN: ${{ steps.generate-token.outputs.token }} |
0 commit comments