Skip to content

Commit eae4ed2

Browse files
committed
chore: macos builder should be 12 and format the yaml file with prettier
1 parent 6a80979 commit eae4ed2

File tree

1 file changed

+63
-43
lines changed

1 file changed

+63
-43
lines changed

.github/workflows/release.yml

+63-43
Original file line numberDiff line numberDiff line change
@@ -24,52 +24,72 @@ jobs:
2424
matrix:
2525
nif: ["2.16", "2.15"]
2626
job:
27-
- { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04 , use-cross: true }
28-
- { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04 , use-cross: true }
29-
- { target: aarch64-unknown-linux-musl , os: ubuntu-20.04 , use-cross: true }
30-
- { target: aarch64-apple-darwin , os: macos-11 }
31-
- { target: riscv64gc-unknown-linux-gnu , os: ubuntu-20.04 , use-cross: true }
32-
- { target: x86_64-apple-darwin , os: macos-11 }
33-
- { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 }
34-
- { target: x86_64-unknown-linux-musl , os: ubuntu-20.04 , use-cross: true }
35-
- { target: x86_64-pc-windows-gnu , os: windows-2019 }
36-
- { target: x86_64-pc-windows-msvc , os: windows-2019 }
27+
- {
28+
target: arm-unknown-linux-gnueabihf,
29+
os: ubuntu-20.04,
30+
use-cross: true,
31+
}
32+
- {
33+
target: aarch64-unknown-linux-gnu,
34+
os: ubuntu-20.04,
35+
use-cross: true,
36+
}
37+
- {
38+
target: aarch64-unknown-linux-musl,
39+
os: ubuntu-20.04,
40+
use-cross: true,
41+
}
42+
- { target: aarch64-apple-darwin, os: macos-12 }
43+
- {
44+
target: riscv64gc-unknown-linux-gnu,
45+
os: ubuntu-20.04,
46+
use-cross: true,
47+
}
48+
- { target: x86_64-apple-darwin, os: macos-12 }
49+
- { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04 }
50+
- {
51+
target: x86_64-unknown-linux-musl,
52+
os: ubuntu-20.04,
53+
use-cross: true,
54+
}
55+
- { target: x86_64-pc-windows-gnu, os: windows-2019 }
56+
- { target: x86_64-pc-windows-msvc, os: windows-2019 }
3757

3858
steps:
39-
- name: Checkout source code
40-
uses: actions/checkout@v3
59+
- name: Checkout source code
60+
uses: actions/checkout@v3
4161

42-
- name: Extract project version
43-
shell: bash
44-
run: |
45-
# Get the project version from mix.exs
46-
echo "PROJECT_VERSION=$(sed -n 's/^ @version "\(.*\)"/\1/p' mix.exs | head -n1)" >> $GITHUB_ENV
47-
- name: Install Rust toolchain
48-
uses: dtolnay/rust-toolchain@stable
49-
with:
50-
toolchain: stable
51-
target: ${{ matrix.job.target }}
62+
- name: Extract project version
63+
shell: bash
64+
run: |
65+
# Get the project version from mix.exs
66+
echo "PROJECT_VERSION=$(sed -n 's/^ @version "\(.*\)"/\1/p' mix.exs | head -n1)" >> $GITHUB_ENV
67+
- name: Install Rust toolchain
68+
uses: dtolnay/rust-toolchain@stable
69+
with:
70+
toolchain: stable
71+
target: ${{ matrix.job.target }}
5272

53-
- name: Build the project
54-
id: build-crate
55-
uses: philss/[email protected]
56-
with:
57-
project-name: resvg
58-
project-version: ${{ env.PROJECT_VERSION }}
59-
target: ${{ matrix.job.target }}
60-
nif-version: ${{ matrix.nif }}
61-
use-cross: ${{ matrix.job.use-cross }}
62-
project-dir: "native/resvg"
73+
- name: Build the project
74+
id: build-crate
75+
uses: philss/[email protected]
76+
with:
77+
project-name: resvg
78+
project-version: ${{ env.PROJECT_VERSION }}
79+
target: ${{ matrix.job.target }}
80+
nif-version: ${{ matrix.nif }}
81+
use-cross: ${{ matrix.job.use-cross }}
82+
project-dir: "native/resvg"
6383

64-
- name: Artifact upload
65-
uses: actions/upload-artifact@v3
66-
with:
67-
name: ${{ steps.build-crate.outputs.file-name }}
68-
path: ${{ steps.build-crate.outputs.file-path }}
84+
- name: Artifact upload
85+
uses: actions/upload-artifact@v3
86+
with:
87+
name: ${{ steps.build-crate.outputs.file-name }}
88+
path: ${{ steps.build-crate.outputs.file-path }}
6989

70-
- name: Publish archives and packages
71-
uses: softprops/action-gh-release@v1
72-
with:
73-
files: |
74-
${{ steps.build-crate.outputs.file-path }}
75-
if: startsWith(github.ref, 'refs/tags/')
90+
- name: Publish archives and packages
91+
uses: softprops/action-gh-release@v1
92+
with:
93+
files: |
94+
${{ steps.build-crate.outputs.file-path }}
95+
if: startsWith(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)