File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 repo-token : ${{ secrets.GITHUB_TOKEN }}
3232
3333 - name : Install dependencies
34- run : |
35- nimble install -y --depsOnly
36- nimble setup -y
37- echo '--path:"src"' >> nimble.paths
34+ run : nimble install -y --depsOnly
3835
3936 - name : Compute build flags
4037 run : |
5754 cp README.md LICENSE ${{ matrix.artifact }}/
5855 tar czf ${{ matrix.artifact }}.${{ matrix.ext }} ${{ matrix.artifact }}
5956
57+ - name : Upload artifact (GitHub Actions)
58+ uses : actions/upload-artifact@v4
59+ with :
60+ name : ${{ matrix.artifact }}
61+ path : ${{ matrix.artifact }}.${{ matrix.ext }}
62+
6063 - name : Upload artifact to 3code.capocasa.dev
6164 if : github.ref == 'refs/heads/main'
6265 run : |
Original file line number Diff line number Diff line change 44 push :
55 branches : [main]
66 tags : ['[0-9]+.[0-9]+.[0-9]+']
7- paths :
8- - ' .github/workflows/osx.yml'
9- - ' src/**'
10- - ' tests/**'
11- - ' *.nimble'
12- - ' config.nims'
137
148jobs :
159 build :
2317 repo-token : ${{ secrets.GITHUB_TOKEN }}
2418
2519 - name : Install dependencies
26- run : |
27- nimble install -y --depsOnly
28- nimble setup -y
29- echo '--path:"src"' >> nimble.paths
20+ run : nimble install -y --depsOnly
3021
3122 - name : Compute build flags
3223 shell : bash
6960 curl -fsSL https://curl.se/ca/cacert.pem -o 3code-macos-universal/cacert.pem
7061 tar czf 3code-macos-universal.tar.gz 3code-macos-universal
7162
63+ - name : Upload artifact (GitHub Actions)
64+ uses : actions/upload-artifact@v4
65+ with :
66+ name : 3code-macos-universal
67+ path : 3code-macos-universal.tar.gz
68+
7269 - name : Upload artifact to 3code.capocasa.dev
7370 if : github.ref == 'refs/heads/main'
7471 run : |
Original file line number Diff line number Diff line change 2121 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2222 GH_REPO : ${{ github.repository }}
2323 run : |
24- sha="${{ github.sha }}"
25- tag="${{ github.ref_name }}"
24+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
25+ tag="${{ inputs.tag }}"
26+ sha=$(gh api "repos/${{ github.repository }}/commits/$tag" -q '.sha')
27+ else
28+ tag="${{ github.ref_name }}"
29+ sha="${{ github.sha }}"
30+ fi
31+ echo "tag=$tag sha=$sha"
2632 mkdir -p dl
2733
2834 for workflow in Linux OSX Windows; do
7581 env :
7682 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7783 run : |
78- gh release create "${{ github.ref_name }}" \
84+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
85+ tag="${{ inputs.tag }}"
86+ else
87+ tag="${{ github.ref_name }}"
88+ fi
89+ gh release create "$tag" \
7990 --repo ${{ github.repository }} \
80- --title "${{ github.ref_name }} " \
91+ --title "$tag " \
8192 --generate-notes \
8293 3code-linux-amd64.tar.gz \
8394 3code-linux-arm64.tar.gz \
Original file line number Diff line number Diff line change 55 push :
66 branches : [main]
77 tags : ['[0-9]+.[0-9]+.[0-9]+']
8- paths :
9- - ' .github/workflows/windows.yml'
10- - ' src/**'
11- - ' tests/**'
12- - ' *.nimble'
13- - ' config.nims'
148
159jobs :
1610 build :
3428 repo-token : ${{ secrets.GITHUB_TOKEN }}
3529
3630 - name : Install dependencies
37- run : |
38- nimble install -y --depsOnly
39- nimble setup -y
40- echo '--path:"src"' >> nimble.paths
31+ run : nimble install -y --depsOnly
4132
4233 - name : Compute build flags
4334 run : |
You can’t perform that action at this time.
0 commit comments