Skip to content
This repository was archived by the owner on Feb 16, 2025. It is now read-only.

Commit bd2eb31

Browse files
authored
ci: use common snapcrafters ci; update README (#62)
1 parent 0529d81 commit bd2eb31

6 files changed

+187
-85
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Promote
2+
3+
on:
4+
issue_comment:
5+
types:
6+
- created
7+
8+
permissions:
9+
issues: write
10+
11+
jobs:
12+
promote:
13+
name: ⬆️ Promote to stable
14+
environment: "Candidate Branch"
15+
runs-on: ubuntu-latest
16+
if: |
17+
( !github.event.issue.pull_request )
18+
&& contains(github.event.comment.body, '/promote ')
19+
&& contains(github.event.*.labels.*.name, 'testing')
20+
steps:
21+
- name: ⬆️ Promote to stable
22+
uses: snapcrafters/ci/promote-to-stable@main
23+
with:
24+
github-token: ${{ secrets.GITHUB_TOKEN }}
25+
store-token: ${{ secrets.SNAP_STORE_STABLE }}

.github/workflows/pull-request.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
branches: [ "candidate" ]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
build:
13+
name: 🧪 Build snap on amd64
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: 🧪 Build snap on amd64
17+
uses: snapcrafters/ci/test-snap-build@main
+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Release
2+
3+
on:
4+
# Run the workflow each time new commits are pushed to the candidate branch.
5+
push:
6+
branches: [ "candidate" ]
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
issues: write
16+
17+
jobs:
18+
get-architectures:
19+
name: 🖥 Get snap architectures
20+
runs-on: ubuntu-latest
21+
outputs:
22+
architectures: ${{ steps.get-architectures.outputs.architectures }}
23+
architectures-list: ${{ steps.get-architectures.outputs.architectures-list }}
24+
steps:
25+
- name: 🖥 Get snap architectures
26+
id: get-architectures
27+
uses: snapcrafters/ci/get-architectures@main
28+
29+
release:
30+
name: 🚢 Release to latest/candidate
31+
needs: get-architectures
32+
runs-on: ubuntu-latest
33+
environment: "Candidate Branch"
34+
strategy:
35+
matrix:
36+
architecture: ${{ fromJSON(needs.get-architectures.outputs.architectures-list) }}
37+
steps:
38+
- name: 🚢 Release to latest/candidate
39+
uses: snapcrafters/ci/release-to-candidate@main
40+
with:
41+
architecture: ${{ matrix.architecture }}
42+
launchpad-token: ${{ secrets.LP_BUILD_SECRET }}
43+
repo-token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
44+
store-token: ${{ secrets.SNAP_STORE_CANDIDATE }}
45+
46+
call-for-testing:
47+
name: 📣 Create call for testing
48+
needs: [release, get-architectures]
49+
environment: "Candidate Branch"
50+
runs-on: ubuntu-latest
51+
outputs:
52+
issue-number: ${{ steps.issue.outputs.issue-number }}
53+
steps:
54+
- name: 📣 Create call for testing
55+
id: issue
56+
uses: snapcrafters/ci/call-for-testing@main
57+
with:
58+
architectures: ${{ needs.get-architectures.outputs.architectures }}
59+
github-token: ${{ secrets.GITHUB_TOKEN }}
60+
61+
screenshots:
62+
name: 📸 Gather screenshots
63+
needs: call-for-testing
64+
environment: "Candidate Branch"
65+
runs-on: ubuntu-latest
66+
steps:
67+
- name: 📸 Gather screenshots
68+
uses: snapcrafters/ci/get-screenshots@main
69+
with:
70+
issue-number: ${{ needs.call-for-testing.outputs.issue-number }}
71+
github-token: ${{ secrets.GITHUB_TOKEN }}
72+
screenshots-token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}

.github/workflows/test-snap-can-build.yml

-25
This file was deleted.

README.md

+73-60
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,87 @@
11
<h1 align="center">
22
<img src="https://www.eclipse.org/org/artwork/images/eclipse_ide_logo.png" alt="Eclipse">
3-
<br />
4-
Eclipse
53
</h1>
64

7-
<p align="center"><b>This is the snap for Eclipse</b>, <i>an amazing open source community of Tools, Projects and
8-
Collaborative Working Groups</i>. It works on Ubuntu, Fedora, Debian, and other major Linux
9-
distributions.</p>
5+
<p align="center"><b>This is the snap for Eclipse</b>. It is a community-maintained package to easily install Eclipse on Ubuntu, Fedora, Debian and other major Linux distributions. It is available in the Snap Store, Ubuntu Software, and a number of other applications.</p>
6+
7+
<p align="center"><i>"An amazing open source community of Tools, Projects and Collaborative Working Groups."</i></p>
108

119
<p align="center">
1210
<a href="https://snapcraft.io/eclipse"><img src="https://snapcraft.io/eclipse/badge.svg" alt="Snap Status"></a>
11+
<a href="https://github.com/snapcrafters/eclipse/actions/workflows/sync-upstream.yml"><img src="https://github.com/snapcrafters/eclipse/actions/workflows/sync-upstream.yml/badge.svg"></a>
12+
<a href="https://github.com/snapcrafters/eclipse/actions/workflows/release-to-candidate.yml"><img src="https://github.com/snapcrafters/eclipse/actions/workflows/release-to-candidate.yml/badge.svg"></a>
13+
<a href="https://github.com/snapcrafters/eclipse/actions/workflows/promote-to-stable.yml"><img src="https://github.com/snapcrafters/eclipse/actions/workflows/promote-to-stable.yml/badge.svg"></a>
1314
</p>
1415

1516
## Install
1617

17-
snap install eclipse
18+
```shell
19+
snap install eclipse
20+
```
1821

1922
([Don't have snapd installed?](https://snapcraft.io/docs/core/install))
2023

21-
![eclipse](https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/Eclipse_4.6.3.png/1200px-Eclipse_4.6.3.png "eclipse")
22-
23-
<p align="center">Published for <img src="http://anything.codes/slack-emoji-for-techies/emoji/tux.png" align="top" width="24" /> with :gift_heart: by Snapcrafters</p>
24-
25-
## Remaining tasks
26-
27-
Snapcrafters ([join us](https://forum.snapcraft.io/t/join-snapcrafters/1325))
28-
are working to land snap install documentation and
29-
the [snapcraft.yaml](https://github.com/snapcrafters/fork-and-rename-me/blob/master/snap/snapcraft.yaml)
30-
upstream so Eclipse.org can authoritatively publish future releases.
31-
32-
- [x] Fork the [Snapcrafters template](https://github.com/snapcrafters/fork-and-rename-me) repository to your own GitHub account.
33-
- If you have already forked the Snapcrafter template to your account and want to create another snap, you'll need to use GitHub's [Import repository](https://github.com/new/import) feature because you can only fork a repository once.
34-
- [x] Rename the forked Snapcrafters template repository
35-
- [x] Update the description of the repository
36-
- [x] Update logos and references to `[Project]` and `[my-snap-name]`
37-
- [x] Create a snap that runs in `devmode`
38-
- [x] Register the snap in the store, **using the preferred upstream name**
39-
- [x] Add a screenshot to this `README.md`
40-
- [x] Publish the `devmode` snap in the Snap store edge channel
41-
- [x] Add install instructions to this `README.md`
42-
- [x] Update snap store metadata, icons and screenshots
43-
- [x] Convert the snap to `strict` confinement, or `classic` confinement if it qualifies
44-
- [x] Publish the confined snap in the Snap store beta channel
45-
- [x] Update the install instructions in this `README.md`
46-
- [x] Post a call for testing on the [Snapcraft Forum](https://forum.snapcraft.io)
47-
- [x] Ask a [Snapcrafters admin](https://github.com/orgs/snapcrafters/people?query=%20role%3Aowner) to fork your repo into github.com/snapcrafters, transfer the snap name from you to snapcrafters, and configure the repo for automatic publishing into edge on commit
48-
- [x] Add the provided Snapcraft build badge to this `README.md`
49-
- [x] Publish the snap in the Snap store stable channel
50-
- [x] Update the install instructions in this `README.md`
51-
- [ ] Post an announcement in the [Snapcraft Forum](https://forum.snapcraft.io)
52-
- [ ] Submit a pull request or patch upstream that adds snap install documentation
53-
- [ ] Submit a pull request or patch upstream that adds the `snapcraft.yaml` and any required assets/launchers
54-
- [ ] Add upstream contact information to the `README.md`
55-
- If upstream accept the PR:
56-
- [ ] Request upstream create a Snap store account
57-
- [ ] Contact the Snap Advocacy team to request the snap be transferred to upstream
58-
- [ ] Ask the Snap Advocacy team to celebrate the snap
59-
60-
If you have any questions, [post in the Snapcraft forum](https://forum.snapcraft.io).
61-
62-
## The Snapcrafters
63-
64-
| [![Manuel Stahl](https://avatars1.githubusercontent.com/u/4992400?s=180&v=4)](https://github.com/thymythos/) |
65-
| :---: |
66-
| [Manuel Stahl](https://github.com/thymythos/) |
67-
68-
<!-- Uncomment and modify this when you have upstream contacts
69-
## Upstream
70-
71-
| [![Upstream Name](http://gravatar.com/avatar/bc0bced65e963eb5c3a16cab8b004431?s=128)](https://github.com/upstreamname) |
72-
| :---: |
73-
| [Upstream Name](https://github.com/upstreamname) |
74-
-->
24+
<p align="center">Published for <img src="https://raw.githubusercontent.com/anythingcodes/slack-emoji-for-techies/gh-pages/emoji/tux.png" align="top" width="24" /> with :gift_heart: by Snapcrafters</p>
25+
26+
## How to contribute to this snap
27+
28+
Thanks for your interest! Below you find instructions to help you contribute to this snap.
29+
30+
The general workflow is to submit pull requests that merges your changes into the `candidate` branch here on GitHub. Once the pull request has been merged, a GitHub action will automatically build the snap and publish it to the `candidate` channel in the Snap Store. Once the snap has been tested thoroughly, we promote it to the `stable` channel so all our users get it!
31+
32+
### Initial setup
33+
34+
If this is your first time contributing to this snap, you first need to set up your own fork of this repository.
35+
36+
1. [Fork the repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) into your own GitHub namespace.
37+
2. [Clone your fork](https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository), so that you have it on your local computer.
38+
3. Configure your local repo. To make things a bit more intuitive, we will rename your fork's remote to `myfork`, and add the snapcrafters repo as `snapcrafters`.
39+
40+
```shell
41+
git remote rename origin myfork
42+
git remote add snapcrafters https://github.com/snapcrafters/eclipse.git
43+
git fetch --all
44+
```
45+
46+
### Submitting changes in a pull request
47+
48+
Once you're all setup for contributing, keep in mind that you want the git information to be all up-to-date. So if you haven't "fetched" all changes in a while, start with that:
49+
50+
```shell
51+
git fetch --all -p
52+
```
53+
54+
Now that your git metadata has been updated you are ready to create a bugfix branch, make your changes, and open a pull request.
55+
56+
1. All pull requests should go to the stable branch so create your branch as a copy of the stable branch:
57+
58+
```shell
59+
git checkout -b my-bugfix-branch snapcrafters/candidate
60+
```
61+
62+
2. Make your desired changes and build a snap locally for testing:
63+
64+
```shell
65+
snapcraft --use-lxd
66+
```
67+
68+
3. After you are happy with your changes, commit them and push them to your fork so they are available on GitHub:
69+
70+
```shell
71+
git commit -a
72+
git push -u myfork my-bugfix-branch
73+
```
74+
75+
4. Then, [open up a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) from your `my-bugfix-branch` to the `snapcrafters/candidate` branch.
76+
5. Once you've opened the pull request, it will automatically trigger the build-test action that will launch a build of the snap. You can watch the progress of the snap build from your pull request (Show all checks -> Details). Once the snap build has completed, you can find the built snap (to test with) under "Artifacts".
77+
6. Someone from the team will review the open pull request and either merge it or start a discussion with you with additional changes or clarification needed.
78+
7. Once the pull request has been merged into the stable branch, a GitHub action will rebuild the snap using your changes and publish it to the [Snap Store](https://snapcraft.io/eclipse) into the `candidate` channel. After sufficient testing of the snap from the candidate channel, one of the maintainers or administrators will promote the snap to the stable branch in the Snap Store.
79+
80+
## Maintainers
81+
82+
- [@thymythos](https://github.com/thymythos/)
83+
84+
## License
85+
86+
- The license of the build files in this repository is MIT
87+
- Eclipse is licensed as EPL-2.0

0 commit comments

Comments
 (0)